SharedTableCleaner implements Command { @Override public void run() { final List<Display<?>> displays = displayService.getDisplays(SharedTable .getTable()); displays.forEach(Display::close); SharedTable.reset(); }  @Override void run();  }
@Test public void testRun() throws Exception { SharedTable.add("Label", "Header", 0.0); assertTrue("Sanity check failed, no data in SharedTable", SharedTable .hasData()); command().run(SharedTableCleaner.class, true).get(); assertFalse("Table should have no data", SharedTable.hasData()); }