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

        HelloWorldService helloWorldService = mock(HelloWorldService.class);

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

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

        Try<String> supplier = Try.ofSupplier(Retry.decorateSupplier(retry, helloWorldService::returnHelloWorld));

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