@Test public void should_not_crashOnDeletedSensor() throws Exception { // given SensorEvent event = new SensorEvent("CERN", "LHC", "Siggh boson", "SB", "number", "#", 1, 2, 3, 4, 5, 10); sessionManager.onEvent(event); // when sessionManager.deleteSensorStream(event.getSensorName()); // then (shouldn't crash) sessionManager.onEvent(event); }
public void deleteSensorStream(Sensor sensor) { String sensorName = sensor.getSensorName(); deleteSensorStream(sensorName); }