### Question:
GenericServerSourceFilterer implements ServerSourceFilterer { @Override public List<IDataSource> getNonActiveServers(List<IDataSource> servers) { List<IDataSource> nonActiveServers = New.list(); Map<String, OGCServerSource> registeredServers = mapRegisteredServers(); for (IDataSource dataSource : servers) { OGCServerSource server = (OGCServerSource)dataSource; OGCServerSource registeredServer = registeredServers.get(server.getWFSServerURL()); if (registeredServer != null) { if (!registeredServer.isActive()) { nonActiveServers.add(registeredServer); } } else { registeredServer = registeredServers.get(server.getWMSServerURL()); if (registeredServer != null && !registeredServer.isActive()) { nonActiveServers.add(registeredServer); } } } return nonActiveServers; } GenericServerSourceFilterer(ServerSourceController serverSourceController); @Override void findBusyServers(IActivationListener listener, List<IDataSource> servers); @Override List<IDataSource> getNonActiveServers(List<IDataSource> servers); @Override List<IDataSource> getNonAddedServers(List<IDataSource> servers);  }### Answer:
@Test public void testGetNonActiveServers() { List<IDataSource> registeredServers = createRegisteredServers(); ServerSourceController sourceController = createSourceController(registeredServers); List<IDataSource> servers = createStateServers(); EasyMock.replay(sourceController); GenericServerSourceFilterer filterer = new GenericServerSourceFilterer(sourceController); List<IDataSource> nonActiveServers = filterer.getNonActiveServers(servers); assertEquals(2, nonActiveServers.size()); boolean wfsServerFound = false; boolean wmsServerFound = false; for (IDataSource dataSource : nonActiveServers) { OGCServerSource server = (OGCServerSource)dataSource; if (ourWfsNonActiveServer.equals(server.getWFSServerURL())) { wfsServerFound = true; } else if (ourWmsNonActiveServer.equals(server.getWMSServerURL())) { wmsServerFound = true; } } assertTrue(wfsServerFound); assertTrue(wmsServerFound); EasyMock.verify(sourceController); }