HighlighterPageExtension extends SimplePageExtension { @Override public void fillModel(@NotNull Map<String, Object> model, @NotNull HttpServletRequest request) { super.fillModel(model, request); model.put("pluginId", PLUGIN_ID); model.put("model", highlightDataModel); } HighlighterPageExtension(@NotNull PagePlaces pagePlaces, @NotNull SBuildServer sBuildServer,
                                    EventDispatcher<BuildServerListener> eventDispatcher); @Override void fillModel(@NotNull Map<String, Object> model, @NotNull HttpServletRequest request); @Override boolean isAvailable(@NotNull HttpServletRequest request); void setActiveDataStoreName(String activeDataStoreName);  }
@Test public void testFillModel() throws Exception { final HashMap<String, Object> map = new HashMap<>(); highlighterPageExtension.isAvailable(httpServletRequest); highlighterPageExtension.fillModel(map, httpServletRequest); assertThat((String) map.get("pluginId"), is("highlighter-plugin")); final HighlightDataModel dataModel = (HighlightDataModel) map.get("model"); assertThat(dataModel.getHighlightData().size(), is(2)); assertThat(dataModel.getHighlightData().get(0).getCollapsedByDefault(), is(false)); assertThat(dataModel.getHighlightData().get(0).getLevel(), is(Level.error)); assertThat(dataModel.getHighlightData().get(0).getValues().size(), is(2)); assertThat(dataModel.getHighlightData().get(1).getLevel(), is(Level.info)); assertThat(dataModel.getHighlightData().get(1).getValues().size(), is(1)); }