AffOrgMatchVotersFactory { public static AffOrgMatchVoter createSectionedNameStrictCountryLooseMatchVoter(float matchStrength, Function<AffMatchOrganization, List<String>> getOrgNamesFunction) { SectionedNameStrictMatchVoter orgNameVoter = new SectionedNameStrictMatchVoter(); orgNameVoter.setGetOrgNamesFunction(getOrgNamesFunction); CompositeMatchVoter voter = new CompositeMatchVoter(ImmutableList.of(new CountryCodeLooseMatchVoter(), orgNameVoter)); voter.setMatchStrength(matchStrength); return voter; } private  AffOrgMatchVotersFactory(); static AffOrgMatchVoter createNameCountryStrictMatchVoter(float matchStrength, Function<AffMatchOrganization, List<String>> getOrgNamesFunction); static AffOrgMatchVoter createNameStrictCountryLooseMatchVoter(float matchStrength, Function<AffMatchOrganization, List<String>> getOrgNamesFunction); static AffOrgMatchVoter createSectionedNameStrictCountryLooseMatchVoter(float matchStrength, Function<AffMatchOrganization, List<String>> getOrgNamesFunction); static AffOrgMatchVoter createSectionedNameLevenshteinCountryLooseMatchVoter(float matchStrength, Function<AffMatchOrganization, List<String>> getOrgNamesFunction);  }
@Test public void createSectionedNameStrictCountryLooseMatchVoter() { AffOrgMatchVoter voter = AffOrgMatchVotersFactory.createSectionedNameStrictCountryLooseMatchVoter(matchStrength, getOrgNamesFunction); assertEquals(matchStrength, voter.getMatchStrength(), PRECISION); assertTrue(voter instanceof CompositeMatchVoter); assertInternalVotersCount(voter, 2); assertTrue(getInternalVoter(voter, 0) instanceof CountryCodeLooseMatchVoter); assertOrgNameVoter(getInternalVoter(voter, 1), SectionedNameStrictMatchVoter.class, getOrgNamesFunction); }