### Question:
DefaultIconManager implements IconManager { @Override public Map<String, Object> getMetaData(String iconName) throws IconException { return this.getMetaData(iconName, getIconSet(iconName)); }  @Override String render(String iconName); @Override String render(String iconName, String iconSetName); @Override String render(String iconName, String iconSetName, boolean fallback); @Override String renderHTML(String iconName); @Override String renderHTML(String iconName, String iconSetName); @Override String renderHTML(String iconName, String iconSetName, boolean fallback); @Override Map<String, Object> getMetaData(String iconName); @Override Map<String, Object> getMetaData(String iconName, String iconSetName); @Override Map<String, Object> getMetaData(String iconName, String iconSetName, boolean fallback); @Override List<String> getIconNames(); @Override List<String> getIconNames(String iconSetName);  }### Answer:
@Test public void getMetaData() throws Exception { IconSet iconSet = new IconSet("iconSet"); iconSet.setType(IconType.FONT); iconSet.setIconUrl("http: iconSet.setIconCssClass("fa fa-$icon"); iconSet.addIcon("test", new Icon("hello")); when(iconSetManager.getCurrentIconSet()).thenReturn(iconSet); when(iconSetManager.getIconSet("iconSet")).thenReturn(iconSet); when(iconRenderer.render("test", iconSet, "fa fa-$icon")).thenReturn("fa fa-hello"); when(iconRenderer.render("test", iconSet, "http: .thenReturn("http: Map<String, Object> metadata = iconManager.getMetaData("test"); assertEquals("iconSet", metadata.get(IconManager.META_DATA_ICON_SET_NAME)); assertEquals("FONT", metadata.get(IconManager.META_DATA_ICON_SET_TYPE)); assertEquals("http: assertEquals("fa fa-hello", metadata.get(IconManager.META_DATA_CSS_CLASS)); assertEquals(metadata, iconManager.getMetaData("test", "iconSet")); }
@Test public void getMetaDataWithoutFallback() throws Exception { Map<String, Object> metadata = iconManager.getMetaData("test", "iconSet", false); assertTrue(metadata.isEmpty()); }