static <T, R> Function<T, R> decorateFunction(Observation observation, Function<T, R> function) {
        return (T t) -> observation.observe(() -> function.apply(t));
    }
@Test
    public void shouldDecorateFunctionAndReturnWithSuccess() throws Throwable {
        given(helloWorldService.returnHelloWorldWithName("Tom")).willReturn("Hello world Tom");
        Function<String, String> function = Observations
            .decorateFunction(observation, helloWorldService::returnHelloWorldWithName);

        String result = function.apply("Tom");

        assertThat(result).isEqualTo("Hello world Tom");
        assertThatObservationWasStartedAndFinishedWithoutErrors();
        then(helloWorldService).should().returnHelloWorldWithName("Tom");
    }