### Question:
AerialPlatformResultHandler implements ResultHandler, EventListener<ActiveDataGroupsChangedEvent> { @Override public void handleResults(OSHDataTypeInfo dataType, List<Output> outputs, List<CancellableInputStream> streams) throws IOException { int index = 0; List<PlatformMetadata> locations = New.list(); List<PlatformMetadata> platformOrientations = New.list(); List<PlatformMetadata> gimbalOrientations = New.list(); for (CancellableInputStream stream : streams) { Output output = outputs.get(index); if (ourPlatformLocationName.equals(output.getName())) { myLocationParser.parse(output, stream, locations); } else if (ourPlatformAttitudeName.equals(output.getName())) { myPlatformOrientationParser.parse(output, stream, platformOrientations); } else if (ourGimbalAttitudeName.equals(output.getName())) { myGimbalParser.parse(output, stream, gimbalOrientations); } index++; } List<PlatformMetadata> metadatas = myCombiner.combineData(locations, platformOrientations, gimbalOrientations); index = 0; for (PlatformMetadata metadata : metadatas) { metadata.setFootprint(myFootprintCalc.calculateFootprint2(metadata, ourFOVWidth, ourFOVHeight)); index++; } depositMetadatas(dataType, metadatas); } 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 testHandleResults() throws IOException { TimeZone.setDefault(TimeZone.getTimeZone("GMT")); EasyMockSupport support = new EasyMockSupport(); DataRegistry dataRegistry = createRegistry(support); UIRegistry uiRegistry = createUIRegistry(support); OSHImageQuerier querier = support.createMock(OSHImageQuerier.class); PreferencesRegistry prefsRegistry = createPrefsRegistryBasic(support); Toolbox toolbox = createToolbox(support, dataRegistry, uiRegistry, prefsRegistry); List<Output> validOuts = createValidOutputs(); Offering offering = createOffering(); OSHDataTypeInfo dataType = createDataType(offering, validOuts); List<CancellableInputStream> testData = createTestData(); support.replayAll(); AerialPlatformResultHandler handler = new AerialPlatformResultHandler(toolbox, querier); handler.handleResults(dataType, validOuts, testData); support.verifyAll(); }