@Test
public void testPlugin() throws Exception {

	Analyzer analyzer = new Analyzer();
	Jar jar = new Jar("test");
	jar.putResource(
		"package.json",
		new EmbeddedResource(getString("dependencies/package.json"), 0));
	analyzer.setJar(jar);
	NpmAnalyzerPlugin npmAnalyzerPlugin = new NpmAnalyzerPlugin();
	npmAnalyzerPlugin.analyzeJar(analyzer);
	Assert.assertEquals("1.2.4", analyzer.getBundleVersion());
	Assert.assertEquals(
		"/liferay-1.2.4",
		analyzer.getProperty(NpmAnalyzerPlugin.WEB_CONTEXT_PATH));
	String property = analyzer.getProperty(Constants.PROVIDE_CAPABILITY);
	Assert.assertEquals(
		"osgi.webresource;osgi.webresource=liferay;" +
			"version:Version=\"1.2.4\"",
		property);
	property = analyzer.getProperty(Constants.REQUIRE_CAPABILITY);
	Assert.assertEquals(
		"osgi.webresource;filter:=\"(&(osgi.webresource=liferay)" +
			"(&(version>=1.0.0)(!(version>=1.1.0))))\"",
		property);
}