ExtensionLicense { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (obj instanceof ExtensionLicense) { ExtensionLicense license = (ExtensionLicense) obj; return StringUtils.equals(getName(), license.getName()); } return false; } ExtensionLicense(String name, List<String> content); String getName(); List<String> getContent(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test void equals() { assertEquals(new ExtensionLicense("name", Arrays.asList("content")), new ExtensionLicense("name", Arrays.asList("content"))); assertEquals(new ExtensionLicense("name", Arrays.asList("content")), new ExtensionLicense("name", Arrays.asList("content2"))); assertNotEquals(new ExtensionLicense("name", Arrays.asList("content")), new ExtensionLicense("name2", Arrays.asList("content"))); }