### Question:
GetTransactionsComputedCallbackImpl implements
        ComputeTransactionsInteractor.GetTransactionsComputedCallback { @Override public void onGetTransactionsListOK(List<TransactionRatedDomain> transactionList, String totalAmount) { if (mView.isReady()) { mView.computedRatesForTransactions(transactionsRatedDataMapper.transformToUI(transactionList), totalAmount); mView.visibilityChangesAfterSuccessfulComputedRates(); } } GetTransactionsComputedCallbackImpl(ComputingTransactionsPresenter.View  view,
                                     TransactionsRatedDataMapper transactionsRatedDataMapper); @Override void onGetTransactionsListOK(List<TransactionRatedDomain> transactionList, String totalAmount); @Override void onGetTransactionListKO(String error);  }### Answer:
@Test public void callbackIsWorkingForOKAndReady() throws Exception { when(view.isReady()).thenReturn(true); callbackToTest.onGetTransactionsListOK(list, AMOUNT); verify(view, getTimes()).isReady(); verify(view, getTimes()).computedRatesForTransactions(anyList(), anyString()); verify(view, getTimes()).visibilityChangesAfterSuccessfulComputedRates(); verify(mapper, getTimes()).transformToUI(anyList()); }
@Test public void callbackIsStoppedWhenOKAndNotReady() throws Exception { when(view.isReady()).thenReturn(false); callbackToTest.onGetTransactionsListOK(list, AMOUNT); verify(view, getTimes()).isReady(); verify(view, getNoTime()).computedRatesForTransactions(anyList(), anyString()); verify(view, getNoTime()).visibilityChangesAfterSuccessfulComputedRates(); }