@Test(groups = { "unit" }, timeOut = TIMEOUT)

public void invokeAsyncWithGoneException() {
    Configs configs = new Configs();
    ReplicatedResourceClient resourceClient = new ReplicatedResourceClient(configs, new AddressSelector(addressResolver, Protocol.Https), null,
            transportClient, serviceConfigReader, authorizationTokenProvider, enableReadRequestsFallback, false);
    FailureValidator validator = FailureValidator.builder().instanceOf(DocumentClientException.class).build();
    RxDocumentServiceRequest request = Mockito.spy(RxDocumentServiceRequest.create(OperationType.Create, ResourceType.Document));
    Mockito.when(addressResolver.resolveAsync(Matchers.any(), Matchers.anyBoolean()))
            .thenReturn(Single.error(new GoneException()));
    Single<StoreResponse> response = resourceClient.invokeAsync(request, null);
    validateFailure(response, validator, TIMEOUT);
    //method will fail 7 time (first try ,last try , and 5 retries within 30 sec(1,2,4,8,15 wait))
    Mockito.verify(addressResolver, Mockito.times(7)).resolveAsync(Matchers.any(), Matchers.anyBoolean());
}