### Question:
SpsOperator { protected SensorTask getSensorTask(String sensorTaskId) throws OwsException { if (!sensorInstanceProvider.containsTaskWith(sensorTaskId)) { handleInvalidParameter("task", sensorTaskId); } return sensorInstanceProvider.getTaskForTaskId(sensorTaskId); }  SensorPlugin getSensorInstance(String procedure); SensorInstanceProvider getSensorInstanceProvider(); void setSensorInstanceProvider(SensorInstanceProvider sensorInstanceProvider); abstract boolean isSupportingExtensions();  }### Answer:
@Test public void testGetSensorTask() { try { for (String taskId : tasks) { if (operatorUnderTest.getSensorTask(taskId) == null) { fail("null was returned instead of throwing IVPE!"); } } } catch (OwsException e) { fail("could not get sensor task"); } }
@Test public void testGetSensorTaskThrowingException() { try { operatorUnderTest.getSensorTask(INVALID_TASK); fail("Invalid task id returnd valid non null task instance!"); } catch (InvalidParameterValueException e) { } catch (OwsException e) { fail("Invalid task id returnd valid non null task instance!"); } }