### Question:
DefaultIconManager implements IconManager { @Override public String render(String iconName) throws IconException { return iconRenderer.render(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 render() throws Exception { IconSet iconSet = new IconSet("silk"); iconSet.addIcon("test", new Icon("hello")); when(iconSetManager.getCurrentIconSet()).thenReturn(iconSet); when(iconSetManager.getIconSet("silk")).thenReturn(iconSet); when(iconRenderer.render("test", iconSet)).thenReturn("rendered icon"); String result = iconManager.render("test"); assertEquals("rendered icon", result); }
@Test public void renderWithFallBack() throws Exception { IconSet iconSet = new IconSet("silk"); when(iconSetManager.getCurrentIconSet()).thenReturn(iconSet); IconSet defaultIconSet = new IconSet("default"); when(iconSetManager.getDefaultIconSet()).thenReturn(defaultIconSet); when(iconRenderer.render("test", defaultIconSet)).thenReturn("rendered icon"); String result = iconManager.render("test"); assertEquals("rendered icon", result); }