### Question:
GenericServerSourceProvider implements ServerSourceProvider { @Override public List<IDataSource> getServersInNode(Node node) { List<URL> wfsUrls = myWfsRetriever.getUrls(node); List<URL> wmsUrls = myWmsRetriever.getUrls(node); List<URL> nrtUrls = myNrtRetriever.getUrls(node); return getServers(wfsUrls, wmsUrls, nrtUrls); } GenericServerSourceProvider(Toolbox toolbox); @Override List<IDataSource> getServersInNode(Node node); @Override List<IDataSource> getServersInNode(StateType state);  }### Answer:
@Test public void testGetServersInNode() throws ParserConfigurationException, XPathExpressionException, JAXBException, MalformedURLException { Toolbox tbMock = EasyMock.createNiceMock(Toolbox.class); PluginToolboxRegistry registry = EasyMock.createNiceMock(PluginToolboxRegistry.class); ServerToolbox serverToolbox = EasyMock.createNiceMock(ServerToolbox.class); WFSLayerConfigurationManager manager = new WFSLayerConfigurationManager(); EasyMock.expect(tbMock.getPluginToolboxRegistry()).andReturn(registry).anyTimes(); EasyMock.expect(registry.getPluginToolbox(ServerToolbox.class)).andReturn(serverToolbox).anyTimes(); EasyMock.expect(serverToolbox.getLayerConfigurationManager()).andReturn(manager).anyTimes(); EasyMock.replay(tbMock, registry, serverToolbox); DefaultWFSLayerConfiguration nrtConfiguration = new DefaultWFSLayerConfiguration("nrt", DefaultCustomization.class); manager.addServerConfiguration(nrtConfiguration); GenericServerSourceProvider sourceProvider = new GenericServerSourceProvider(tbMock); List<IDataSource> servers = sourceProvider.getServersInNode(createNode()); OGCServerSource wmsServer = null; assertEquals(2, servers.size()); for (IDataSource dataSource : servers) { OGCServerSource server = (OGCServerSource)dataSource; if (StringUtils.isEmpty(server.getWFSServerURL())) { wmsServer = server; } } assertNotNull(wmsServer); assertEquals(ourWmsIpUrl, wmsServer.getWMSServerURL()); assertEquals(new URL(ourWmsIpUrl).getHost(), wmsServer.getName()); assertNull(wmsServer.getWFSServerURL()); }