@Test public void renderWithException() throws Exception { IconSet iconSet = new IconSet("default"); iconSet.setRenderWiki("image:$icon.png"); iconSet.addIcon("test", new Icon("blabla")); IconException exception = new IconException("exception", null); when(velocityRenderer.render(any())).thenThrow(exception); IconException caughtException = null; try { iconRenderer.render("test", iconSet); } catch (IconException e) { caughtException = e; } assertNotNull(caughtException); assertEquals(exception, caughtException); }
@Override public String render(String iconName, IconSet iconSet) throws IconException { return render(iconName, iconSet, iconSet.getRenderWiki()); }
DefaultIconRenderer implements IconRenderer { @Override public String render(String iconName, IconSet iconSet) throws IconException { return render(iconName, iconSet, iconSet.getRenderWiki()); } }
DefaultIconRenderer implements IconRenderer { @Override public String render(String iconName, IconSet iconSet) throws IconException { return render(iconName, iconSet, iconSet.getRenderWiki()); }  }
DefaultIconRenderer implements IconRenderer { @Override public String render(String iconName, IconSet iconSet) throws IconException { return render(iconName, iconSet, iconSet.getRenderWiki()); }  @Override String render(String iconName, IconSet iconSet); @Override String renderHTML(String iconName, IconSet iconSet); @Override String render(String iconName, IconSet iconSet, String renderer); @Override void use(IconSet iconSet); }
DefaultIconRenderer implements IconRenderer { @Override public String render(String iconName, IconSet iconSet) throws IconException { return render(iconName, iconSet, iconSet.getRenderWiki()); }  @Override String render(String iconName, IconSet iconSet); @Override String renderHTML(String iconName, IconSet iconSet); @Override String render(String iconName, IconSet iconSet, String renderer); @Override void use(IconSet iconSet);  }