@Override
    public Map<String, Metric> getMetrics() {
        return metricRegistry.getMetrics();
    }
@Test
    public void shouldReturnTotalNumberOfRequestsAs5OnlyFailsChecked() throws IOException {

        HelloWorldService helloWorldService = mock(HelloWorldService.class);

        Retry retry = Retry.of("metrics", RetryConfig.<String>custom()
            .retryExceptions(Exception.class)
            .maxAttempts(5)
            .failAfterMaxAttempts(true)
            .build());

        willThrow(new HelloWorldException()).given(helloWorldService).returnHelloWorldWithException();

        Callable<String> retryableCallable = Retry.decorateCallable(retry, helloWorldService::returnHelloWorldWithException);

        Try<Void> run = Try.run(retryableCallable::call);

        assertThat(retry.getMetrics().getNumberOfTotalCalls()).isEqualTo(5);
        assertThat(run.isFailure()).isTrue();
    }