### Question:
GetTransactionsComputedCallbackImpl implements
        ComputeTransactionsInteractor.GetTransactionsComputedCallback { @Override public void onGetTransactionListKO(String error) { if (mView.isReady()) { mView.errorComputingRates(error); mView.visibilityChangesAfterErrorComputedRates(); } } GetTransactionsComputedCallbackImpl(ComputingTransactionsPresenter.View  view,
                                     TransactionsRatedDataMapper transactionsRatedDataMapper); @Override void onGetTransactionsListOK(List<TransactionRatedDomain> transactionList, String totalAmount); @Override void onGetTransactionListKO(String error);  }### Answer:
@Test public void callbackIsWorkingForKOAndReady() throws Exception { when(view.isReady()).thenReturn(true); callbackToTest.onGetTransactionListKO(ERROR); verify(view, getTimes()).isReady(); verify(view, getTimes()).errorComputingRates(anyString()); verify(view, getTimes()).visibilityChangesAfterErrorComputedRates(); }
@Test public void callbackIsStoppedWhenKOAndNotReady() throws Exception { when(view.isReady()).thenReturn(false); callbackToTest.onGetTransactionListKO(anyString()); verify(view, getTimes()).isReady(); verify(view, getNoTime()).errorComputingRates(anyString()); verify(view, getNoTime()).visibilityChangesAfterErrorComputedRates(); }