### Question:
StationComponent { public List<ReportDatum> generateReportData(boolean onlyMutableVariables) { List<ReportDatum> reportData = new ArrayList<>(); variableAccessors.values().forEach(accessor -> { if (shouldGenerateReportDataForVariable(onlyMutableVariables, accessor.isMutable())) { reportData.addAll(accessor.generateReportData(getComponentName())); } }); return reportData; } StationComponent(List<VariableAccessor> variableAccessors); abstract String getComponentName(); GetVariableResult getVariable(GetVariableDatum getVariableDatum); Set<String> getVariableNames(); void setVariable(SetVariableDatum setVariableDatum); SetVariableValidationResult validate(SetVariableDatum setVariableDatum); VariableAccessor getVariableAccessorByName(CiString.CiString50 name); List<ReportDatum> generateReportData(boolean onlyMutableVariables);  }### Answer:
@Test @DisplayName("Generating base reports for mutable variables only") void shouldGenerateBaseReportForMutableVariablesOnly() { List<ReportDatum> reportData = stationComponent.generateReportData(true); assertThat(reportData.size()).isEqualTo(1); }
@Test @DisplayName("Generating base reports for all variables") void shouldGenerateBaseReportForAllVariables() { when(immutableAccessorMock.generateReportData(any())).thenReturn(REPORT_DATA); List<ReportDatum> reportData = stationComponent.generateReportData(false); assertThat(reportData.size()).isEqualTo(2); }