@Test
public void testGetDbArtifact(){

    final Artifact artifact = DataModelFactory.createArtifact("groupId", "artifactId", "version", "classifier", "type", "extension");
    artifact.setSize("10Mo");
    artifact.setDownloadUrl("http://www.nowhere.com");
    artifact.setProvider("http://www.nowhere.com/provider");
    final ModelMapper modelMapper = new ModelMapper(mock(RepositoryHandler.class));
    final DbArtifact dbArtifact = modelMapper.getDbArtifact(artifact);
    assertEquals(artifact.getGroupId(), dbArtifact.getGroupId());
    assertEquals(artifact.getArtifactId(), dbArtifact.getArtifactId());
    assertEquals(artifact.getVersion(), dbArtifact.getVersion());
    assertEquals(artifact.getClassifier(), dbArtifact.getClassifier());
    assertEquals(artifact.getType(), dbArtifact.getType());
    assertEquals(artifact.getExtension(), dbArtifact.getExtension());
    assertEquals(artifact.getSize(), dbArtifact.getSize());
    assertEquals(artifact.getDownloadUrl(), dbArtifact.getDownloadUrl());
    assertEquals(artifact.getProvider(), dbArtifact.getProvider());
}