Dependency newDependency(MavenProject prj) {
        final File pom = new File(prj.getBasedir(), "pom.xml");

        if (pom.isFile()) {
            getLog().debug("Adding virtual dependency from pom.xml");
            return new Dependency(pom, true);
        } else if (prj.getFile().isFile()) {
            getLog().debug("Adding virtual dependency from file");
            return new Dependency(prj.getFile(), true);
        } else {
            return new Dependency(true);
        }
    }
@Test
    public void should_newDependency_get_default_virtual_dependency() {
        // Given
        BaseDependencyCheckMojo instance = new BaseDependencyCheckMojoImpl();

        new MockUp<MavenProject>() {
            @Mock
            public File getBasedir() {
                return new File("src/test/resources/dir_without_pom");
            }

            @Mock
            public File getFile() {
                return new File("src/test/resources/dir_without_pom");
            }
        };

        // When
        String output = instance.newDependency(project).getFileName();

        // Then
        assertNull(output);
    }