@Test
public void testGetAllTheArtifactsOfAModuleThatHasSubModules(){

    final Module module = DataModelFactory.createModule("module1", "1.0.0-SNAPSHOT");
    final Module subModule = DataModelFactory.createModule("module11", "1.0.0-SNAPSHOT");
    final Module subSubModule = DataModelFactory.createModule("module111", "1.0.0-SNAPSHOT");
    module.addSubmodule(subModule);
    subModule.addSubmodule(subSubModule);
    final Artifact artifact1 = DataModelFactory.createArtifact("com.my.company", "artifact1", "1.0.0-SNAPSHOT", null, "jar", "jar");
    module.addArtifact(artifact1);
    final Artifact artifact2 = DataModelFactory.createArtifact("com.my.company", "artifact2", "1.0.0-SNAPSHOT", null, "jar", "jar");
    subModule.addArtifact(artifact2);
    final Artifact artifact3 = DataModelFactory.createArtifact("com.my.company", "artifact3", "1.0.0-SNAPSHOT", null, "jar", "jar");
    subSubModule.addArtifact(artifact3);
    final List<Artifact> artifacts = ModuleUtils.getAllArtifacts(module);
    assertEquals(3, artifacts.size());
    assertTrue(artifacts.contains(artifact1));
    assertTrue(artifacts.contains(artifact2));
    assertTrue(artifacts.contains(artifact3));
}