EndpointDescriptionBundleParser { public List<EndpointDescription> getAllEndpointDescriptions(Bundle b) { Enumeration<URL> urls = getEndpointDescriptionURLs(b); List<EndpointDescription> elements = new ArrayList<>(); while (urls.hasMoreElements()) { URL resourceURL = urls.nextElement(); try { elements.addAll(parser.readEndpoints(resourceURL.openStream())); } catch (Exception ex) { LOG.warn("Problem parsing: " + resourceURL, ex); } } return elements; } EndpointDescriptionBundleParser(); List<EndpointDescription> getAllEndpointDescriptions(Bundle b);  }
@Test public void testNoRemoteServicesXMLFiles() { Bundle b = EasyMock.createNiceMock(Bundle.class); EasyMock.replay(b); List<EndpointDescription> rsElements = new EndpointDescriptionBundleParser().getAllEndpointDescriptions(b); Assert.assertEquals(0, rsElements.size()); }