@Test public void testCheckedLongToDoubleFunction() { LongToDoubleFunction test = Unchecked.longToDoubleFunction( l -> { throw new Exception("" + l); }); assertLongToDoubleFunction(test, RuntimeException.class); }
@Test public void testCheckedLongToDoubleFunctionWithCustomHandler() { LongToDoubleFunction test = Unchecked.longToDoubleFunction( l -> { throw new Exception("" + l); }, e -> { throw new IllegalStateException(e); }); assertLongToDoubleFunction(test, IllegalStateException.class); }