### Question:
AerialPlatformResultHandler implements ResultHandler, EventListener<ActiveDataGroupsChangedEvent> { @Override public String getQueryProperty(Offering offering, Output output) { String filterString = "Location"; if (ourPlatformAttitudeName.equals(output.getName())) { filterString = "PlatformOrientation"; } else if (ourGimbalAttitudeName.equals(output.getName())) { filterString = "Gimbal"; } String property = null; for (String aProperty : offering.getObservableProperties()) { if (aProperty.contains(filterString)) { property = aProperty; } } return property; } AerialPlatformResultHandler(Toolbox toolbox, OSHImageQuerier querier); @Override List<Output> canHandle(List<Output> outputs); @Override String getQueryProperty(Offering offering, Output output); @Override void handleGroupActivation(DataTypeInfo dataType, ActivationState state); @Override void handleResults(OSHDataTypeInfo dataType, List<Output> outputs, List<CancellableInputStream> streams); @Override void initializeType(OSHDataTypeInfo dataType); @Override void notify(ActiveDataGroupsChangedEvent event);  }### Answer:
@Test public void testGetQueryProperty() { EasyMockSupport support = new EasyMockSupport(); DataRegistry dataRegistry = support.createMock(DataRegistry.class); UIRegistry uiRegistry = support.createMock(UIRegistry.class); PreferencesRegistry prefsRegistry = createPrefsRegistryBasic(support); Toolbox toolbox = createToolbox(support, dataRegistry, uiRegistry, prefsRegistry); OSHImageQuerier querier = support.createMock(OSHImageQuerier.class); List<Output> validOuts = createValidOutputs(); Offering offering = createOffering(); support.replayAll(); AerialPlatformResultHandler handler = new AerialPlatformResultHandler(toolbox, querier); assertEquals("http: handler.getQueryProperty(offering, validOuts.get(0))); assertEquals("http: handler.getQueryProperty(offering, validOuts.get(1))); assertEquals("http: handler.getQueryProperty(offering, validOuts.get(2))); support.verifyAll(); }