AllScenariosPageRenderer extends PageWithChartRenderer { public String getRenderedContentByFeatureFilter( final AllScenariosPageCollection allScenariosPageCollection, final Template template, final Feature feature) throws CluecumberPluginException { AllScenariosPageCollection allScenariosPageCollectionClone = getAllScenariosPageCollectionClone(allScenariosPageCollection); allScenariosPageCollectionClone.setFeatureFilter(feature); Report[] reportArray = allScenariosPageCollectionClone.getReports() .stream() .filter(report -> report.getFeatureIndex() == feature.getIndex()) .toArray(Report[]::new); allScenariosPageCollectionClone.clearReports(); allScenariosPageCollectionClone.addReports(reportArray); addChartJsonToReportDetails(allScenariosPageCollectionClone); return processedContent(template, allScenariosPageCollectionClone); } @Inject  AllScenariosPageRenderer(
            final ChartJsonConverter chartJsonConverter,
            final ChartConfiguration chartConfiguration,
            final PropertyManager propertyManager
    ); String getRenderedContent(
            final AllScenariosPageCollection allScenariosPageCollection, final Template template); String getRenderedContentByTagFilter(
            final AllScenariosPageCollection allScenariosPageCollection,
            final Template template,
            final Tag tag); String getRenderedContentByStepFilter(
            final AllScenariosPageCollection allScenariosPageCollection,
            final Template template,
            final Step step); String getRenderedContentByFeatureFilter(
            final AllScenariosPageCollection allScenariosPageCollection,
            final Template template,
            final Feature feature);  }
@Test public void getRenderedContentByFeatureFilterTest() throws CluecumberPluginException { Template template = mock(Template.class); AllScenariosPageCollection allScenariosPageCollection = new AllScenariosPageCollection(""); Report report = new Report(); report.setFeatureIndex(12); Report[] reportList = new Report[]{report}; allScenariosPageCollection.addReports(reportList); Feature feature = new Feature("feature", "description\non some line", "uri", 12); allScenariosPageRenderer.getRenderedContentByFeatureFilter(allScenariosPageCollection, template, feature); }