@Test
public void testPluginWithBadVersion() throws Exception {

	Analyzer analyzer = new Analyzer();
	Jar jar = new Jar("test");
	jar.putResource(
		"package.json",
		new EmbeddedResource(
			getString("dependencies/package.bad.version.json"), 0));
	analyzer.setJar(jar);
	NpmAnalyzerPlugin npmAnalyzerPlugin = new NpmAnalyzerPlugin();
	npmAnalyzerPlugin.analyzeJar(analyzer);
	Assert.assertEquals("0.0.0.1word-cha_rs", analyzer.getBundleVersion());
	Assert.assertEquals(
		"/liferay-0.0.0.1word-cha_rs",
		analyzer.getProperty(NpmAnalyzerPlugin.WEB_CONTEXT_PATH));
	Assert.assertEquals(
		"osgi.webresource;osgi.webresource=liferay;" +
			"version:Version=\"0.0.0.1word-cha_rs\"",
		analyzer.getProperty(Constants.PROVIDE_CAPABILITY));
}