### Question:
ExternalIdUtil { public static String toCitation(String contributor, String description, String publicationYear) { String[] array = {contributor, publicationYear, description}; List<String> nonBlanks = new ArrayList<String>(); for (String string : array) { if (StringUtils.isNotBlank(string)) { nonBlanks.add(string); } } return StringUtils.join(nonBlanks, ". ").trim(); }  static String urlForExternalId(String externalId); static boolean isIRMNG(String idPrefix); static String urlForIRMNG(String externalId, String idPrefix); static Map<String, String> getURLPrefixMap(); static Map<String, String> getURLSuffixMap(); static boolean isSupported(String externalId); static TaxonomyProvider taxonomyProviderFor(String externalId); static String getUrlFromExternalId(String jsonString); static String buildJsonUrl(String url); static String toCitation(String contributor, String description, String publicationYear); static String selectValue(Map<String, String> link, String[] candidateIdsInIncreasingPreference); static boolean hasProperty(Map<String, String> link, String propertyName); static String stripPrefix(TaxonomyProvider provider, String externalId); static String prefixForUrl(String url); static boolean isLikelyId(String idCandidate); static boolean isUnlikelyId(String idCandidate);  }### Answer:
@Test public void buildCitation() { assertThat(ExternalIdUtil.toCitation("Joe Smith", "my study", "1984"), is("Joe Smith. 1984. my study")); assertThat(ExternalIdUtil.toCitation("Joe Smith", null, "1984"), is("Joe Smith. 1984")); assertThat(ExternalIdUtil.toCitation("Joe Smith", "my study", null), is("Joe Smith. my study")); }