TabModelImpl implements TabModel { @Override public void addChild(ComponentModel component) { children.put(component.getPath(), component); } TabModelImpl(String title); @Override String getTitle(); @Override Map<String, Object> getProperties(); @Override void setProperties(Map<String, Object> properties); @Override LayoutModel getLayout(String path, String layoutType); @Override ComponentModel getChild(String path); @Override void addChild(ComponentModel component); @Override Map<String, ComponentModel> getChildren();  }
@Test public void testAddChild() { TabModel tab = new TabModelImpl("Tab"); String path = "/Shuffleboard/Tab/Foo"; ComponentModel child = new WidgetModelImpl(path, tab, () -> null, "", Collections.emptyMap()); tab.addChild(child); assertSame(child, tab.getChild(path)); }