@@ -0,0 +1,2280 @@
+package nakadi;%0A%0Aimport com.google.common.collect.ImmutableMap;%0Aimport java.io.EOFException;%0Aimport java.io.IOException;%0Aimport java.io.UncheckedIOException;%0Aimport java.util.Map;%0Aimport org.junit.Test;%0A%0Aimport static junit.framework.TestCase.assertTrue;%0Aimport static org.junit.Assert.assertFalse;%0A%0Apublic class ExceptionSupportTest %7B%0A%0A  private static final ImmutableMap%3CThrowable, Boolean%3E CODES_TO_EXCEPTIONS =%0A      ImmutableMap.%3CThrowable, Boolean%3Ebuilder()%0A          // ok%0A          .put(new ServerException(Problem.localProblem(%22%22, %22%22)), true)%0A          .put(new NetworkException(Problem.localProblem(%22%22, %22%22)), true)%0A          .put(new RateLimitException(Problem.localProblem(%22%22, %22%22)), true)%0A          .put(new EOFException(), true)%0A          .put(new UncheckedIOException(new java.net.SocketTimeoutException()), true)%0A          .put(new UncheckedIOException(new IOException(%22%22)), true)%0A          .put(new java.util.concurrent.TimeoutException(), true)%0A          // nope%0A          .put(new Throwable(%22%22), false)%0A          .put(new Exception(), false)%0A          .put(new InterruptedException(), false)%0A          .put(new IOException(), false)%0A          .put(new NakadiException(Problem.localProblem(%22%22, %22%22)), false)%0A          .put(new ClientException(Problem.localProblem(%22%22, %22%22)), false)%0A          .put(new ContractException(Problem.localProblem(%22%22, %22%22)), false)%0A          .put(new NotFoundException(Problem.localProblem(%22%22, %22%22)), false)%0A          .put(new PreconditionFailedException(Problem.localProblem(%22%22, %22%22)), false)%0A          .build();%0A%0A  @Test%0A  public void isEventStreamRetryable() %7B%0A    for (Map.Entry%3CThrowable, Boolean%3E entry : CODES_TO_EXCEPTIONS.entrySet()) %7B%0A      assertTrue(entry.getValue() == ExceptionSupport.isEventStreamRetryable(entry.getKey()));%0A      assertFalse(ExceptionSupport.isEventStreamRetryable(%0A          new ConflictException(Problem.localProblem(%22%22, %22%22))));%0A    %7D%0A  %7D%0A%0A  @Test%0A  public void isSubscriptionStreamRetryable() %7B%0A    for (Map.Entry%3CThrowable, Boolean%3E e : CODES_TO_EXCEPTIONS.entrySet()) %7B%0A      assertTrue(e.getValue() == ExceptionSupport.isSubscriptionStreamRetryable(e.getKey()));%0A      assertTrue(ExceptionSupport.isSubscriptionStreamRetryable(%0A          new ConflictException(Problem.localProblem(%22%22, %22%22))));%0A    %7D%0A  %7D%0A%7D

Add tests for retryable exceptions