@Override
    public String getName() {
        return "Dart Package Analyzer";
    }
@Test
    public void testDartPubspecLockAnalyzer() throws AnalysisException {
        final Engine engine = new Engine(getSettings());
        final Dependency result = new Dependency(BaseTest.getResourceAsFile(this,
                "dart/pubspec.lock"));
        dartAnalyzer.analyze(result, engine);

        assertThat(engine.getDependencies().length, equalTo(5));

        Dependency dependency1 = engine.getDependencies()[0];
        Dependency dependency2 = engine.getDependencies()[1];
        Dependency dependency3 = engine.getDependencies()[2];
        Dependency dependency4 = engine.getDependencies()[3];
        Dependency dependency5 = engine.getDependencies()[4];

        assertThat(dependency1.getName(), equalTo("_fe_analyzer_shared"));
        assertThat(dependency1.getVersion(), equalTo("40.0.0"));
        for (Identifier identifier : dependency1.getSoftwareIdentifiers()) {
            if (identifier instanceof GenericIdentifier) {
                assertThat(identifier.getValue(), equalTo("cpe:2.3:a:*:_fe_analyzer_shared:40.0.0:*:*:*:*:*:*:*"));
            }
            if (identifier instanceof PurlIdentifier) {
                assertThat(identifier.getValue(), equalTo("pkg:pub/_fe_analyzer_shared@40.0.0"));
            }
        }

        assertThat(dependency2.getName(), equalTo("analyzer"));
        assertThat(dependency2.getVersion(), equalTo("4.1.0"));

        assertThat(dependency3.getName(), equalTo("build_runner"));
        assertThat(dependency3.getVersion(), equalTo("2.1.11"));

        assertThat(dependency4.getName(), equalTo("collection"));
        assertThat(dependency4.getVersion(), equalTo("1.16.0"));

        assertThat(dependency5.getName(), equalTo("dart_software_development_kit"));
        assertThat(dependency5.getVersion(), equalTo("2.17.0"));
    }