@Test(groups = "unit")
public void timeout2() throws Exception {

    initializeConsistencyWriter(false);
    TimeoutHelper timeoutHelper = Mockito.mock(TimeoutHelper.class);
    Mockito.doReturn(false).doReturn(true).when(timeoutHelper).isElapsed();
    ConsistencyWriter spyConsistencyWriter = Mockito.spy(this.consistencyWriter);
    TestSubscriber<StoreResponse> subscriber = new TestSubscriber();
    spyConsistencyWriter.writeAsync(Mockito.mock(RxDocumentServiceRequest.class), timeoutHelper, false)
            .toObservable()
            .subscribe(subscriber);
    subscriber.awaitTerminalEvent(10, TimeUnit.MILLISECONDS);
    subscriber.assertError(RequestTimeoutException.class);
}