@Test
public void testArtifactWithOnlyKnownLicenseId() {

    License license = new License();
    license.setId(LICENSE_ID);
    
    Artifact artifact = new Artifact();
    artifact.addFact(new ConfiguredLicenseInformation(license));
    knowledgeBaseResolver.process(Collections.singletonList(artifact));
    final Collection<License> finalLicenses = ArtifactLicenseUtils.getFinalLicenses(artifact).getLicenses();
    assertThat(finalLicenses.size()).isEqualTo(1);
    assertThat(finalLicenses.stream()
            .findAny())
            .hasValueSatisfying(l -> {
                assertThat(l.getId()).isEqualTo(LICENSE_ID);
                assertThat(l.getCommonName()).isEqualTo(LICENSE_NAME);
                assertThat(l.getText()).isEqualTo(LICENSE_TEXT);
                assertThat(l.getThreatGroup()).hasValue(LICENSE_THREAT_GROUP);
                assertThat(l.getClassification()).hasValue(LICENSE_CLASSIFICATION);
    });
}