@Test public void testEqualLicense() { License license1 = new License ("Apache-2.0"); License license2 = new License ("Apache-2.0", "Apache License Version 2.0", "Some license text"); License license3 = new License ("MIT"); assertThat(license1.equalLicense(license2)).isTrue(); assertThat(license1.equalLicense(license3)).isFalse(); }
public boolean equalLicense(License license) { return Objects.equals(getId(), license.getId()); }
License implements LicenseInformation { public boolean equalLicense(License license) { return Objects.equals(getId(), license.getId()); } }
License implements LicenseInformation { public boolean equalLicense(License license) { return Objects.equals(getId(), license.getId()); } License();  License(String id);  License(String id, String commonName, String text);  License(String id, String commonName, String text, Map<String, String> properties); }
License implements LicenseInformation { public boolean equalLicense(License license) { return Objects.equals(getId(), license.getId()); } License();  License(String id);  License(String id, String commonName, String text);  License(String id, String commonName, String text, Map<String, String> properties); String getId(); void setId(String id); String getCommonName(); void setCommonName(String commonName); String getText(); void setText(String text); Map<String, String> getProperties(); void setProperties(Map<String, String> properties); void setProperty(String key, String property); Optional<String> getProperty(String key); void setThreatGroup(String value); Optional<String> getThreatGroup(); void setClassification(String value); Optional<String> getClassification(); @Override String evaluate(); @Override boolean isEmpty(); @Override Collection<License> getLicenses(); @Override boolean equals(Object o); boolean equalLicense(License license); @Override int hashCode(); @Override String toString(); }
License implements LicenseInformation { public boolean equalLicense(License license) { return Objects.equals(getId(), license.getId()); } License();  License(String id);  License(String id, String commonName, String text);  License(String id, String commonName, String text, Map<String, String> properties); String getId(); void setId(String id); String getCommonName(); void setCommonName(String commonName); String getText(); void setText(String text); Map<String, String> getProperties(); void setProperties(Map<String, String> properties); void setProperty(String key, String property); Optional<String> getProperty(String key); void setThreatGroup(String value); Optional<String> getThreatGroup(); void setClassification(String value); Optional<String> getClassification(); @Override String evaluate(); @Override boolean isEmpty(); @Override Collection<License> getLicenses(); @Override boolean equals(Object o); boolean equalLicense(License license); @Override int hashCode(); @Override String toString();  }