@Test
    public void shouldWrapInRuntimeIfFunctionThrows() {
        final Exception t = new Exception();
        try {
            FunctionUtils.wrapFunction(FunctionUtilsTest::throwIt).apply(t);
        } catch (Exception ex) {
            assertThat(ex, instanceOf(RuntimeException.class));
            assertSame(t, ex.getCause());
        }
    }
@author Stephen Mallette (http://stephen.genoprime.com)
gremlin-core/src/test/java/org/apache/tinkerpop/gremlin/util/function/FunctionUtilsTest.java