@Test(expected = NullPointerException.class) public void hash_org_null() { hasher.hash(null); }
@Override public String hash(AffMatchOrganization organization) { Preconditions.checkNotNull(organization); List<String> orgNames = getOrgNamesFunction.apply(organization); if (CollectionUtils.isEmpty(orgNames)) { return null; } return stringHasher.hash(orgNames.get(0)); }
OrganizationNameBucketHasher implements BucketHasher<AffMatchOrganization> { @Override public String hash(AffMatchOrganization organization) { Preconditions.checkNotNull(organization); List<String> orgNames = getOrgNamesFunction.apply(organization); if (CollectionUtils.isEmpty(orgNames)) { return null; } return stringHasher.hash(orgNames.get(0)); } }
OrganizationNameBucketHasher implements BucketHasher<AffMatchOrganization> { @Override public String hash(AffMatchOrganization organization) { Preconditions.checkNotNull(organization); List<String> orgNames = getOrgNamesFunction.apply(organization); if (CollectionUtils.isEmpty(orgNames)) { return null; } return stringHasher.hash(orgNames.get(0)); }  }
OrganizationNameBucketHasher implements BucketHasher<AffMatchOrganization> { @Override public String hash(AffMatchOrganization organization) { Preconditions.checkNotNull(organization); List<String> orgNames = getOrgNamesFunction.apply(organization); if (CollectionUtils.isEmpty(orgNames)) { return null; } return stringHasher.hash(orgNames.get(0)); }  @Override String hash(AffMatchOrganization organization); void setStringHasher(BucketHasher<String> stringHasher); void setGetOrgNamesFunction(Function<AffMatchOrganization, List<String>> getOrgNamesFunction); }
OrganizationNameBucketHasher implements BucketHasher<AffMatchOrganization> { @Override public String hash(AffMatchOrganization organization) { Preconditions.checkNotNull(organization); List<String> orgNames = getOrgNamesFunction.apply(organization); if (CollectionUtils.isEmpty(orgNames)) { return null; } return stringHasher.hash(orgNames.get(0)); }  @Override String hash(AffMatchOrganization organization); void setStringHasher(BucketHasher<String> stringHasher); void setGetOrgNamesFunction(Function<AffMatchOrganization, List<String>> getOrgNamesFunction);  }