@Test
public void getTheOrganizationOfAnArtifactWhichIsInAModuleThatHasAnOrganization(){

    final DbArtifact artifact = new DbArtifact();
    artifact.setArtifactId("test");
    artifact.setVersion("1.0.0-SNAPSHOT");
    final DbOrganization organization = new DbOrganization();
    organization.setName("Test Organization");
    final DbModule module = new DbModule();
    module.setOrganization(organization.getName());
    final RepositoryHandler repositoryHandler = mock(RepositoryHandler.class);
    when(repositoryHandler.getRootModuleOf(artifact.getGavc())).thenReturn(module);
    when(repositoryHandler.getOrganization(organization.getName())).thenReturn(organization);
    final ArtifactHandler handler = new ArtifactHandler(repositoryHandler, mock(LicenseMatcher.class));
    final DbOrganization gotOrganization = handler.getOrganization(artifact);
    assertNotNull(gotOrganization);
    assertEquals(organization, gotOrganization);
}