### Question:
GenericServerSourceFilterer implements ServerSourceFilterer { @Override public List<IDataSource> getNonAddedServers(List<IDataSource> servers) { List<IDataSource> nonAddedServers = New.list(); Map<String, OGCServerSource> registeredServers = mapRegisteredServers(); for (IDataSource dataSource : servers) { if (dataSource instanceof OGCServerSource) { OGCServerSource server = (OGCServerSource)dataSource; if (!registeredServers.containsKey(server.getWFSServerURL()) && !registeredServers.containsKey(server.getWMSServerURL())) { nonAddedServers.add(server); } } } return nonAddedServers; } 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 testGetNonAddedServers() { List<IDataSource> registeredServers = createRegisteredServers(); ServerSourceController sourceController = createSourceController(registeredServers); List<IDataSource> servers = createStateServers(); EasyMock.replay(sourceController); GenericServerSourceFilterer filterer = new GenericServerSourceFilterer(sourceController); List<IDataSource> nonAddedServers = filterer.getNonAddedServers(servers); assertEquals(2, nonAddedServers.size()); boolean wfsServerFound = false; boolean wmsServerFound = false; for (IDataSource dataSource : nonAddedServers) { OGCServerSource server = (OGCServerSource)dataSource; if (ourWfsNonAddedServer.equals(server.getWFSServerURL())) { wfsServerFound = true; } else if (ourWmsNonAddedServer.equals(server.getWMSServerURL())) { wmsServerFound = true; } } assertTrue(wfsServerFound); assertTrue(wmsServerFound); EasyMock.verify(sourceController); }