@Test public void refreshTableTest() { @SuppressWarnings("unchecked") final List<PerClassStatistics> list = mock(List.class); when(model.getRulesByClass()).thenReturn(list); final CountDownLatch latch = mock(CountDownLatch.class); presenter.refreshTable(latch); verify(model).getRulesByClass(); verify(latch).countDown(); verify(view).displayTable(same(list)); }
@VisibleForTesting void refreshTable(final CountDownLatch latch) { final Supplier<List<PerClassStatistics>> supplier = () -> { try { return model.getRulesByClass(); } finally { latch.countDown(); } }; taskRunner.compute(supplier, view::displayTable); }
RulesTabPresenter extends TabPresenter<RulesTabView> { @VisibleForTesting void refreshTable(final CountDownLatch latch) { final Supplier<List<PerClassStatistics>> supplier = () -> { try { return model.getRulesByClass(); } finally { latch.countDown(); } }; taskRunner.compute(supplier, view::displayTable); } }
RulesTabPresenter extends TabPresenter<RulesTabView> { @VisibleForTesting void refreshTable(final CountDownLatch latch) { final Supplier<List<PerClassStatistics>> supplier = () -> { try { return model.getRulesByClass(); } finally { latch.countDown(); } }; taskRunner.compute(supplier, view::displayTable); } RulesTabPresenter(final GuiTaskRunner taskRunner,
        final MainWindowView mainView, final TraceDb traceDb); }
RulesTabPresenter extends TabPresenter<RulesTabView> { @VisibleForTesting void refreshTable(final CountDownLatch latch) { final Supplier<List<PerClassStatistics>> supplier = () -> { try { return model.getRulesByClass(); } finally { latch.countDown(); } }; taskRunner.compute(supplier, view::displayTable); } RulesTabPresenter(final GuiTaskRunner taskRunner,
        final MainWindowView mainView, final TraceDb traceDb); @Override CountDownLatch refresh(); @Override void load(); }
RulesTabPresenter extends TabPresenter<RulesTabView> { @VisibleForTesting void refreshTable(final CountDownLatch latch) { final Supplier<List<PerClassStatistics>> supplier = () -> { try { return model.getRulesByClass(); } finally { latch.countDown(); } }; taskRunner.compute(supplier, view::displayTable); } RulesTabPresenter(final GuiTaskRunner taskRunner,
        final MainWindowView mainView, final TraceDb traceDb); @Override CountDownLatch refresh(); @Override void load();  }