@Test
public void testMainLicenseIsEmptyAndDetectedLicenseNull() {

    Artifact artifact = new Artifact("SW360");
    artifact.setProprietary(false);
    artifact.addCoordinate(new Coordinate(Coordinate.Types.MAVEN, "org.group.id", "artifactIdTest", "1.2.3"));
    artifact.addFact(new DeclaredLicenseInformation(new LicenseStatement()));
    SW360Component sw360Component = new SW360Component();
    sw360Component.setName("artifactIdTest");
    SW360Release release = ArtifactToReleaseUtils.convertToReleaseWithoutAttachments(artifact);
    release.setComponentId(sw360Component.getId());
    release.setMainLicenseIds(Collections.EMPTY_SET);
    assertThat(release.getOverriddenLicense()).isNull();
    assertThat(release.getMainLicenseIds().isEmpty()).isTrue();
}