void doSubmit(final Runnable action) {
    CONTINUATION.get().submit(action);
  }
@Test
  public void testOnSuccessNotCalledWhenException() {
    final AtomicInteger sequence = new AtomicInteger(0);
    final AtomicInteger onSuccess = new AtomicInteger();
    Continuations CONT = new Continuations();
    try {
      CONT.doSubmit(() -> {
        throw new RuntimeException("test");
      });
      CONT.doSubmit(() -> {
        onSuccess.set(sequence.incrementAndGet());
      });
      fail("should have thrown exception");
    } catch (Exception e) {
      assertEquals(e.getMessage(), "test");
    }
    assertEquals(onSuccess.get(), 0);
  }