@Test
public void getModuleDependenciesWithFullRecursiveParam(){

    final DbModule module1 = new DbModule();
    module1.setName("module1");
    module1.setVersion("1.0.0");
    final DbArtifact dependency1 = new DbArtifact();
    dependency1.setGroupId("org.axway.grapes.test.module2");
    dependency1.setArtifactId("dependency1");
    dependency1.setVersion("1.1.0");
    module1.addDependency(dependency1.getGavc(), Scope.COMPILE);
    final DbModule module2 = new DbModule();
    module2.setName("module2");
    module2.setVersion("1.1.0");
    final DbArtifact dependency2 = new DbArtifact();
    dependency2.setGroupId("org.axway.grapes.test.module3");
    dependency2.setArtifactId("dependency2");
    dependency2.setVersion("2.1.0");
    module2.addDependency(dependency2.getGavc(), Scope.COMPILE);
    final DbModule module3 = new DbModule();
    module3.setName("module3");
    module3.setVersion("2.1.0");
    final DbArtifact dependency3 = new DbArtifact();
    dependency3.setGroupId("org.axway.grapes.test");
    dependency3.setArtifactId("dependency3");
    dependency3.setVersion("123");
    module3.addDependency(dependency3.getGavc(), Scope.COMPILE);
    final RepositoryHandler repositoryHandler = mock(RepositoryHandler.class);
    when(repositoryHandler.getModule(module1.getId())).thenReturn(module1);
    when(repositoryHandler.getModule(module2.getId())).thenReturn(module2);
    when(repositoryHandler.getModule(module3.getId())).thenReturn(module3);
    when(repositoryHandler.getArtifact(dependency1.getGavc())).thenReturn(dependency1);
    when(repositoryHandler.getArtifact(dependency2.getGavc())).thenReturn(dependency2);
    when(repositoryHandler.getArtifact(dependency3.getGavc())).thenReturn(dependency3);
    when(repositoryHandler.getRootModuleOf(dependency1.getGavc())).thenReturn(module2);
    when(repositoryHandler.getRootModuleOf(dependency2.getGavc())).thenReturn(module3);
    final FiltersHolder filters = new FiltersHolder();
    filters.getScopeHandler().setScopeComp(true);
    filters.getScopeHandler().setScopePro(true);
    filters.getScopeHandler().setScopeRun(true);
    filters.getScopeHandler().setScopeTest(true);
    filters.getDecorator().setShowThirdparty(true);
    filters.getDepthHandler().setFullRecursive(true);
    final DependencyHandler dependencyHandler = new DependencyHandler(repositoryHandler);
    List<Dependency> dependencies = dependencyHandler.getModuleDependencies(module1.getId(), filters);
    assertEquals(3, dependencies.size());
    filters.getDepthHandler().setFullRecursive(false);
   dependencies = dependencyHandler.getModuleDependencies(module1.getId(), filters);
    assertEquals(1, dependencies.size());
}