### Question:
StationComponentsHolder { public boolean clearMonitor(int id) { return nonNull(monitoredComponents.remove(id)); } StationComponentsHolder(Station station, StationStore stationStore); Optional<StationComponent> getComponent(CiString.CiString50 componentName); void monitorComponent(int monitorId, ComponentVariable componentVariable, SetMonitoringDatum datum); Map<ComponentVariable, List<SetMonitoringDatum>> getAllMonitoredComponents(); Map<ComponentVariable, List<SetMonitoringDatum>> getByComponentAndVariable(List<ComponentVariable> componentVariables); boolean clearMonitor(int id); List<ReportDatum> generateReportData(boolean onlyMutableVariables);  }### Answer:
@Test void testClearMonitor() { ComponentVariable cv = getComponentVariable("component", "variable"); ComponentVariable cv2 = getComponentVariable("component2", "variable2"); victim.monitorComponent(1, cv, generateDatum(1, SetMonitoringDatum.Type.DELTA, cv.getComponent(), cv.getVariable())); victim.monitorComponent(2, cv2, generateDatum(2, SetMonitoringDatum.Type.DELTA, cv2.getComponent(), cv2.getVariable())); assertFalse(victim.clearMonitor(3)); assertTrue(victim.clearMonitor(2)); assertThat(victim.getAllMonitoredComponents()).hasSize(1); assertThat(victim.getAllMonitoredComponents().get(cv)).isNotNull(); }