LicenseSupport { public static LicenseInformation mapLicenses(Collection<String> licenses) { return mapLicenses(licenses, LicenseOperator.AND); }  static LicenseInformation mapLicenses(Collection<String> licenses); static LicenseInformation mapLicenses(Collection<String> licenses, LicenseOperator operator); static LicenseInformation fromSPDXExpression(String spdxExpressionString); static LicenseInformation fromSPDXExpression(SpdxExpression spdxExpression); static LicenseInformation parseSpdxExpression(String expression); static LicenseInformation fromSpdxLicenseReferenceExpression(SpdxLicenseReferenceExpression spdxLicenseReferenceExpression); static LicenseInformation fromSpdxLicenseIdExpression(SpdxLicenseIdExpression spdxLicenseIdExpression); static LicenseInformation fromSPDXCompoundExpression(SpdxCompoundExpression spdxCompoundExpression, LicenseStatement license);  }
@Test public void singleLicenseIsTreatedSimply() { Collection<String> license = Collections.singletonList("Single License"); LicenseInformation actualLicenseSupport = LicenseSupport.mapLicenses(license); assertThat(actualLicenseSupport.evaluate()).startsWith("Single License"); }
@Test public void mulitpleLicensesTreatedCorrectly() { Collection<String> license = Arrays.asList("First License", "Second License", "Third License"); LicenseInformation actualLicenseSupport = LicenseSupport.mapLicenses(license); assertThat(actualLicenseSupport.evaluate()) .startsWith("( First License AND Second License AND Third License )"); }