@Test public void testCheckedToLongFunction() { ToLongFunction<Object> test = Unchecked.toLongFunction( t -> { throw new Exception("" + t); }); assertToLongFunction(test, RuntimeException.class); }
@Test public void testCheckedToLongFunctionWithCustomHandler() { ToLongFunction<Object> test = Unchecked.toLongFunction( t -> { throw new Exception("" + t); }, e -> { throw new IllegalStateException(e); }); assertToLongFunction(test, IllegalStateException.class); }