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

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

    assertIntToLongFunction(test, IllegalStateException.class);
  }