@Test public void fillAlternativeNames_BASED_ON_NAME() { organization.setName("Uniwersytet im. Adama Mickiewicza w Poznaniu"); AffMatchOrganization retOrganization = altNameFiller.fillAlternativeNames(organization); assertThat(retOrganization.getAlternativeNames(), containsInAnyOrder( "Adam Mickiewicz University in Poznań", "Adam Mickiewicz University")); }
public AffMatchOrganization fillAlternativeNames(AffMatchOrganization organization) { List<String> alternativeNames = fetchAlternativeNames(organization.getNames()); alternativeNames.stream().forEach(altName -> organization.addAlternativeName(altName)); return organization; }
AffMatchOrganizationAltNameFiller implements Serializable { public AffMatchOrganization fillAlternativeNames(AffMatchOrganization organization) { List<String> alternativeNames = fetchAlternativeNames(organization.getNames()); alternativeNames.stream().forEach(altName -> organization.addAlternativeName(altName)); return organization; } }
AffMatchOrganizationAltNameFiller implements Serializable { public AffMatchOrganization fillAlternativeNames(AffMatchOrganization organization) { List<String> alternativeNames = fetchAlternativeNames(organization.getNames()); alternativeNames.stream().forEach(altName -> organization.addAlternativeName(altName)); return organization; }  }
AffMatchOrganizationAltNameFiller implements Serializable { public AffMatchOrganization fillAlternativeNames(AffMatchOrganization organization) { List<String> alternativeNames = fetchAlternativeNames(organization.getNames()); alternativeNames.stream().forEach(altName -> organization.addAlternativeName(altName)); return organization; }  AffMatchOrganization fillAlternativeNames(AffMatchOrganization organization); void setAlternativeNamesDictionary(List<Set<String>> alternativeNamesDictionary); }
AffMatchOrganizationAltNameFiller implements Serializable { public AffMatchOrganization fillAlternativeNames(AffMatchOrganization organization) { List<String> alternativeNames = fetchAlternativeNames(organization.getNames()); alternativeNames.stream().forEach(altName -> organization.addAlternativeName(altName)); return organization; }  AffMatchOrganization fillAlternativeNames(AffMatchOrganization organization); void setAlternativeNamesDictionary(List<Set<String>> alternativeNamesDictionary);  }