TabStructure { public TabModel getTab(String title) { if (!tabs.containsKey(title)) { TabModel tab = new TabModelImpl(title); tabs.put(title, tab); dirty(); } return tabs.get(title); }  TabModel getTab(String title); Map<String, TabModel> getTabs(); void setSelectedTab(int tabIndex); void setSelectedTab(String title); int getSelectedTabIndex(); String getSelectedTabTitle(); void addStructureChangeListener(StructureChangeListener listener); void removeStructureChangeListener(StructureChangeListener listener); void dirty();  }
@Test public void testGetTab() { assertEquals(0, structure.getTabs().size(), "Structure should have no initial tabs"); TabModel tab = structure.getTab("Title"); assertAll( () -> assertEquals(1, structure.getTabs().size(), "Should be one tab now"), () -> assertEquals(tab, structure.getTabs().get("Title")) ); }