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