### Question:
SpsOperator { public SensorPlugin getSensorInstance(String procedure) throws OwsException { if (!sensorInstanceProvider.containsSensorWith(procedure)) { handleInvalidParameter("procedure", procedure); } SensorPlugin sensorPlugin = sensorInstanceProvider.getSensorForProcedure(procedure); return NonBlockingTaskingDecorator.enableNonBlockingTasking(sensorPlugin); }  SensorPlugin getSensorInstance(String procedure); SensorInstanceProvider getSensorInstanceProvider(); void setSensorInstanceProvider(SensorInstanceProvider sensorInstanceProvider); abstract boolean isSupportingExtensions();  }### Answer:
@Test public void testGetSensorInstanceFor() { try { for (String procedure : procedures) { if (operatorUnderTest.getSensorInstance(procedure) == null) { fail("null was returned instead of throwing IVPE!"); } } } catch (OwsException e) { fail("Procedure was unknown!"); } }
@Test public void testGetSensorInstanceForThrowingException() { try { operatorUnderTest.getSensorInstance(INVALID_PROCEDURE); fail("Invalid procedure returnd valid non null instance!"); } catch (InvalidParameterValueException e) { } catch (OwsException e) { } }