source: class SyncClientPayloadsPresenterTest {
  
      @Rule
      public final RxSchedulersOverrideRule mOverrideSchedulersRule;
       SyncClientPayloadsPresenter syncClientPayloadsPresenter;
      @Mock DataManagerClient mDataManagerClient;
      @Mock SyncClientPayloadsMvpView mSyncClientPayloadsMvpView;
       List<ClientPayload> clientPayloads;
       String errorSyncServerMessage;
       long clientCreationTime;
  
      @Test
      public void testDeleteAndUpdateClientPayloadFails() {
  
target:         when(mDataManagerClient.deleteAndUpdatePayloads(1, clientCreationTime))
                  .thenReturn(Observable.<List<ClientPayload>>error(new RuntimeException()));
  
          syncClientPayloadsPresenter.deleteAndUpdateClientPayload(1, clientCreationTime);
  
          verify(mSyncClientPayloadsMvpView).showError(R.string.failed_to_update_list);
          verify(mSyncClientPayloadsMvpView, never())
                  .showPayloadDeletedAndUpdatePayloads(clientPayloads);
      }
  
  }