### Question:
AerialImageryTransformer extends DefaultTransformer implements RefreshListener, EventListener<DataTypeInfoColorChangeEvent> { @Override public void close() { myEventManager.unsubscribe(DataTypeInfoColorChangeEvent.class, this); myTimeNotifier.close(); List<Geometry> toRemove = New.list(); for (List<Geometry> geometries : myPublishedGeometries.values()) { toRemove.addAll(geometries); } toRemove.addAll(myBuilderFactory.close()); publishGeometries(New.list(), toRemove); myPublishedGeometries.clear(); super.close(); } AerialImageryTransformer(Toolbox toolbox, OSHImageQuerier querier, DataTypeInfo uavLayer,
            List<DataTypeInfo> linkedLayer); @Override void close(); List<DataTypeInfo> getLinkedLayer(); @Override synchronized void notify(DataTypeInfoColorChangeEvent event); @Override void open(); @Override synchronized void refresh(boolean forceIt); @Override void refreshNow();  }### Answer:
@SuppressWarnings("unchecked") @Test public void testClose() throws QueryException, IOException { EasyMockSupport support = new EasyMockSupport(); EventManager eventManager = createEventManager(support); eventManager.unsubscribe(EasyMock.eq(DataTypeInfoColorChangeEvent.class), EasyMock.isA(AerialImageryTransformer.class)); TimeManager timeManager = createTimeManager(support); timeManager.removeActiveTimeSpanChangeListener(EasyMock.isA(TimeRefreshNotifier.class)); AnimationManager animationManager = createAnimationManager(support); animationManager.removeAnimationChangeListener(EasyMock.isA(TimeRefreshNotifier.class)); List<PlatformMetadata> testData = New.list(createMetadata()); OrderParticipantKey expectedUAVKey = support.createMock(OrderParticipantKey.class); OrderParticipantKey expectedVideoKey = support.createMock(OrderParticipantKey.class); OrderManagerRegistry orderRegistry = createOrderRegistry(support, expectedUAVKey, expectedVideoKey, 1); Toolbox toolbox = createToolbox(support, eventManager, timeManager, animationManager, testData, orderRegistry, 1); DataTypeInfo videoLayer = createVideoLayer(support, expectedVideoKey); OSHImageQuerier querier = createQuerier(support, videoLayer, 1); List<DataTypeInfo> linkedLayer = New.list(videoLayer); DataTypeInfo uavLayer = createUAVDataType(support, expectedUAVKey, 1); GenericSubscriber<Geometry> receiver = createReceiver(support); receiver.receiveObjects(EasyMock.isA(AerialImageryTransformer.class), EasyMock.isA(List.class), EasyMock.isA(List.class)); EasyMock.expectLastCall().andAnswer(this::removeGeometriesAnswer); support.replayAll(); AerialImageryTransformer transformer = new AerialImageryTransformer(toolbox, querier, uavLayer, linkedLayer); transformer.addSubscriber(receiver); transformer.open(); myListener.activeTimeSpansChanged(null); transformer.close(); support.verifyAll(); }