@Test
public void testReadServiceXmlToProvideServiceCapabilities()
	throws Exception {

	InputStream inputStream =
		ServiceAnalyzerPluginTest.class.getResourceAsStream(
			"dependencies/com.liferay.contacts.service1.jar");
	try (Jar jar = new Jar("dot", inputStream);
		Analyzer analyzer = new Analyzer()) {
		analyzer.setJar(jar);
		analyzer.setProperty("Liferay-Service", "true");
		analyzer.setProperty(
			"-liferay-service-xml", "service.xml,**/service.xml");
		Parameters parameters = new Parameters(
			"existing.parameter;saveme=true");
		analyzer.setProperty(
			Constants.PROVIDE_CAPABILITY, parameters.toString());
		ServiceAnalyzerPlugin serviceAnalyzerPlugin =
			new ServiceAnalyzerPlugin();
		serviceAnalyzerPlugin.analyzeJar(analyzer);
		Parameters provideCapabilityHeaders =
			analyzer.getProvideCapability();
		Assert.assertNotNull(provideCapabilityHeaders);
		Assert.assertEquals(
			provideCapabilityHeaders.toString(), 2,
			provideCapabilityHeaders.size());
	}
}