@Test(expected = IllegalArgumentException.class) public void convert_blank_organization_id() { organization.setId(" "); converter.convert(organization); }
public AffMatchOrganization convert(Organization organization) { Preconditions.checkNotNull(organization); Preconditions.checkArgument(StringUtils.isNotBlank(organization.getId())); AffMatchOrganization affMatchOrg = new AffMatchOrganization(organization.getId().toString()); String orgName = toStringWithNullToEmpty(organization.getName()); if (orgName.trim().equalsIgnoreCase("missing legal name")) { orgName = ""; } affMatchOrg.setName(orgName); affMatchOrg.setShortName(toStringWithNullToEmpty(organization.getShortName())); affMatchOrg.setCountryName(toStringWithNullToEmpty(organization.getCountryName())); affMatchOrg.setCountryCode(toStringWithNullToEmpty(organization.getCountryCode())); affMatchOrg.setWebsiteUrl(toStringWithNullToEmpty(organization.getWebsiteUrl())); return affMatchOrg; }
OrganizationConverter implements Serializable { public AffMatchOrganization convert(Organization organization) { Preconditions.checkNotNull(organization); Preconditions.checkArgument(StringUtils.isNotBlank(organization.getId())); AffMatchOrganization affMatchOrg = new AffMatchOrganization(organization.getId().toString()); String orgName = toStringWithNullToEmpty(organization.getName()); if (orgName.trim().equalsIgnoreCase("missing legal name")) { orgName = ""; } affMatchOrg.setName(orgName); affMatchOrg.setShortName(toStringWithNullToEmpty(organization.getShortName())); affMatchOrg.setCountryName(toStringWithNullToEmpty(organization.getCountryName())); affMatchOrg.setCountryCode(toStringWithNullToEmpty(organization.getCountryCode())); affMatchOrg.setWebsiteUrl(toStringWithNullToEmpty(organization.getWebsiteUrl())); return affMatchOrg; } }
OrganizationConverter implements Serializable { public AffMatchOrganization convert(Organization organization) { Preconditions.checkNotNull(organization); Preconditions.checkArgument(StringUtils.isNotBlank(organization.getId())); AffMatchOrganization affMatchOrg = new AffMatchOrganization(organization.getId().toString()); String orgName = toStringWithNullToEmpty(organization.getName()); if (orgName.trim().equalsIgnoreCase("missing legal name")) { orgName = ""; } affMatchOrg.setName(orgName); affMatchOrg.setShortName(toStringWithNullToEmpty(organization.getShortName())); affMatchOrg.setCountryName(toStringWithNullToEmpty(organization.getCountryName())); affMatchOrg.setCountryCode(toStringWithNullToEmpty(organization.getCountryCode())); affMatchOrg.setWebsiteUrl(toStringWithNullToEmpty(organization.getWebsiteUrl())); return affMatchOrg; }  }
OrganizationConverter implements Serializable { public AffMatchOrganization convert(Organization organization) { Preconditions.checkNotNull(organization); Preconditions.checkArgument(StringUtils.isNotBlank(organization.getId())); AffMatchOrganization affMatchOrg = new AffMatchOrganization(organization.getId().toString()); String orgName = toStringWithNullToEmpty(organization.getName()); if (orgName.trim().equalsIgnoreCase("missing legal name")) { orgName = ""; } affMatchOrg.setName(orgName); affMatchOrg.setShortName(toStringWithNullToEmpty(organization.getShortName())); affMatchOrg.setCountryName(toStringWithNullToEmpty(organization.getCountryName())); affMatchOrg.setCountryCode(toStringWithNullToEmpty(organization.getCountryCode())); affMatchOrg.setWebsiteUrl(toStringWithNullToEmpty(organization.getWebsiteUrl())); return affMatchOrg; }  AffMatchOrganization convert(Organization organization); }
OrganizationConverter implements Serializable { public AffMatchOrganization convert(Organization organization) { Preconditions.checkNotNull(organization); Preconditions.checkArgument(StringUtils.isNotBlank(organization.getId())); AffMatchOrganization affMatchOrg = new AffMatchOrganization(organization.getId().toString()); String orgName = toStringWithNullToEmpty(organization.getName()); if (orgName.trim().equalsIgnoreCase("missing legal name")) { orgName = ""; } affMatchOrg.setName(orgName); affMatchOrg.setShortName(toStringWithNullToEmpty(organization.getShortName())); affMatchOrg.setCountryName(toStringWithNullToEmpty(organization.getCountryName())); affMatchOrg.setCountryCode(toStringWithNullToEmpty(organization.getCountryCode())); affMatchOrg.setWebsiteUrl(toStringWithNullToEmpty(organization.getWebsiteUrl())); return affMatchOrg; }  AffMatchOrganization convert(Organization organization);  }