@Test public void testGetSensorForTaskId() throws InternalServiceException { SensorPlugin testPlugin = SimpleSensorPluginTestInstance.createInstance(sensorInstanceProvider); ((SensorInstanceProviderSeam) sensorInstanceProvider).addSensor(testPlugin); SensorTaskService taskService = testPlugin.getSensorTaskService(); SensorTask sensorTask = taskService.createNewTask(); assertEquals(testPlugin, sensorInstanceProvider.getSensorForTaskId(sensorTask.getTaskId())); }
public SensorPlugin getSensorForTaskId(String taskId) { SensorTask sensorTask = sensorTaskRepository.getTask(taskId); return getSensorForProcedure(sensorTask.getProcedure()); }
SensorInstanceProvider implements InsertSensorOfferingListener { public SensorPlugin getSensorForTaskId(String taskId) { SensorTask sensorTask = sensorTaskRepository.getTask(taskId); return getSensorForProcedure(sensorTask.getProcedure()); } }
SensorInstanceProvider implements InsertSensorOfferingListener { public SensorPlugin getSensorForTaskId(String taskId) { SensorTask sensorTask = sensorTaskRepository.getTask(taskId); return getSensorForProcedure(sensorTask.getProcedure()); }  }
SensorInstanceProvider implements InsertSensorOfferingListener { public SensorPlugin getSensorForTaskId(String taskId) { SensorTask sensorTask = sensorTaskRepository.getTask(taskId); return getSensorForProcedure(sensorTask.getProcedure()); }  void init(); Iterable<SensorPlugin> getSensors(); boolean containsTaskWith(String taskId); SensorTask getTaskForTaskId(String taskId); boolean containsSensorWith(String procedure); SensorPlugin getSensorForProcedure(String procedure); SensorPlugin getSensorForTaskId(String taskId); SensorConfigurationRepository getSensorConfigurationRepository(); void setSensorConfigurationRepository(SensorConfigurationRepository sensorConfigurationRepository); SensorTaskRepository getSensorTaskRepository(); void setSensorTaskRepository(SensorTaskRepository sensorTaskRepository); void handleInsertSensorOffering(InsertSensorOfferingEvent insertSensorOfferingEvent); }
SensorInstanceProvider implements InsertSensorOfferingListener { public SensorPlugin getSensorForTaskId(String taskId) { SensorTask sensorTask = sensorTaskRepository.getTask(taskId); return getSensorForProcedure(sensorTask.getProcedure()); }  void init(); Iterable<SensorPlugin> getSensors(); boolean containsTaskWith(String taskId); SensorTask getTaskForTaskId(String taskId); boolean containsSensorWith(String procedure); SensorPlugin getSensorForProcedure(String procedure); SensorPlugin getSensorForTaskId(String taskId); SensorConfigurationRepository getSensorConfigurationRepository(); void setSensorConfigurationRepository(SensorConfigurationRepository sensorConfigurationRepository); SensorTaskRepository getSensorTaskRepository(); void setSensorTaskRepository(SensorTaskRepository sensorTaskRepository); void handleInsertSensorOffering(InsertSensorOfferingEvent insertSensorOfferingEvent);  }