@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, "requirements.txt"));
            engine.addDependency(result);
            analyzer.analyze(result, engine);
            assertFalse(ArrayUtils.contains(engine.getDependencies(), result));
            assertEquals(24, engine.getDependencies().length);
            boolean foundPyYAML = false;
            boolean foundCryptography = false;
            for (Dependency d : engine.getDependencies()) {
                if ("PyYAML".equals(d.getName())) {
                    foundPyYAML = true;
                    assertEquals("3.12", d.getVersion());
                    assertThat(d.getDisplayFileName(), equalTo("PyYAML:3.12"));
                    assertEquals(PythonDistributionAnalyzer.DEPENDENCY_ECOSYSTEM, d.getEcosystem());
                }
                if ("cryptography".equals(d.getName())) {
                    foundCryptography = true;
                    assertEquals("1.8.2", d.getVersion());
                    assertThat(d.getDisplayFileName(), equalTo("cryptography:1.8.2"));
                    assertEquals(PythonDistributionAnalyzer.DEPENDENCY_ECOSYSTEM, d.getEcosystem());
                }
            }
            assertTrue("Expected to find PyYAML", foundPyYAML);
            assertTrue("Expected to find cryptography", foundCryptography);
        }
    }