@Test
public void getAnExistingArtifact(){

    final DbArtifact artifact = new DbArtifact();
    artifact.setArtifactId("test");
    artifact.setVersion("1.0.0-SNAPSHOT");
    final RepositoryHandler repositoryHandler = mock(RepositoryHandler.class);
    when(repositoryHandler.getArtifact(artifact.getGavc())).thenReturn(artifact);
    final ArtifactHandler handler = new ArtifactHandler(repositoryHandler, mock(LicenseMatcher.class));
    final DbArtifact gotArtifact = handler.getArtifact(artifact.getGavc());
    assertNotNull(gotArtifact);
    assertEquals(artifact, gotArtifact);
    verify(repositoryHandler, times(1)).getArtifact(artifact.getGavc());
}