예제 #1
0
  @Test
  public void testCheckedIntToLongFunction() {
    IntToLongFunction test =
        Unchecked.intToLongFunction(
            i -> {
              throw new Exception("" + i);
            });

    assertIntToLongFunction(test, RuntimeException.class);
  }
예제 #2
0
  @Test
  public void testCheckedIntToLongFunctionWithCustomHandler() {
    IntToLongFunction test =
        Unchecked.intToLongFunction(
            i -> {
              throw new Exception("" + i);
            },
            e -> {
              throw new IllegalStateException(e);
            });

    assertIntToLongFunction(test, IllegalStateException.class);
  }