@Override
    public String getName() {
        return ANALYZER_NAME;
    }
@Test
    public void testAnalyzePackageJson() throws Exception {
        try (Engine engine = new Engine(getSettings())) {
            final Dependency result = new Dependency(BaseTest.getResourceAsFile(this,
                    "composer.lock"));
            //simulate normal operation when the composer.lock is already added to the engine as a dependency
            engine.addDependency(result);
            analyzer.analyze(result, engine);
            //make sure the redundant composer.lock is removed
            assertFalse(ArrayUtils.contains(engine.getDependencies(), result));
            assertEquals(30, engine.getDependencies().length);
            boolean found = false;
            for (Dependency d : engine.getDependencies()) {
                if ("classpreloader".equals(d.getName())) {
                    found = true;
                    assertEquals("2.0.0", d.getVersion());
                    assertThat(d.getDisplayFileName(), equalTo("classpreloader:2.0.0"));
                    assertEquals(ComposerLockAnalyzer.DEPENDENCY_ECOSYSTEM, d.getEcosystem());
                }
            }
            assertTrue("Expeced to find classpreloader", found);
        }
    }