@Test
public void testReadCustomServiceXmlLocation() throws Exception {

	InputStream inputStream =
		ServiceAnalyzerPluginTest.class.getResourceAsStream(
			"dependencies/com.liferay.contacts.service2.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", "entities.xml");
		ServiceAnalyzerPlugin serviceAnalyzerPlugin =
			new ServiceAnalyzerPlugin();
		serviceAnalyzerPlugin.analyzeJar(analyzer);
		Parameters provideCapabilityHeaders =
			analyzer.getProvideCapability();
		Assert.assertNotNull(provideCapabilityHeaders);
		Assert.assertEquals(
			provideCapabilityHeaders.toString(), 1,
			provideCapabilityHeaders.size());
	}
}