@Test
public void shouldWrapAnyExceptionComingFromFunctionInJavaFunctionInvocationException() throws NoSuchMethodException {

    // given
    JavaMethodInvoker invoker = new JavaMethodInvoker();
    FunctionWrapper wrapper = new FunctionWrapper();
    // when
    catchException(invoker).invokeMethod(wrapper, FunctionWrapper.class.getDeclaredMethod("throwingMethod"), true);
    // then
    assertThat(caughtException()).isInstanceOf(JavaFunctionInvocationException.class);
}