TracingListPresenter extends RecordListPresenter { @Override public boolean isFormReady() { return tracingFormService.isReady(); } @Inject  TracingListPresenter(TracingService tracingService, TracingFormService tracingFormService, RecordService recordService); @Override boolean isFormReady(); @Override int calculateDisplayedIndex(); @Override List<Long> getRecordsByFilter(SpinnerState spinnerState); @Override List<Long> getSyncedRecords(); @Override int getSyncedRecordsCount();  }
@Test public void should_return_true_if_tracing_form_is_ready() throws Exception { when(tracingFormService.isReady()).thenReturn(true); assertThat("Should return true if tracing form is ready", tracingListPresenter .isFormReady(), is(true)); }
@Test public void should_return_true_when_form_is_ready() { when(tracingFormService.isReady()).thenReturn(true); assertThat(tracingListPresenter.isFormReady(), is(true)); verify(tracingFormService, times(1)).isReady(); }
@Test public void should_return_false_when_form_is_ready() { when(tracingFormService.isReady()).thenReturn(false); assertThat(tracingListPresenter.isFormReady(), is(false)); verify(tracingFormService, times(1)).isReady(); }