NormalizeUtils { public static String trimToNull(String x) { x = StringUtils.trimToNull(x); if (x != null && (x.equals("\\N") || x.equalsIgnoreCase("NULL"))) { x = null; } return x; }  static String normalizeCitation(String citation); static String normalizeTerm(String term); static String replaceUnicodeEntities(String x); static String trimToNull(String x);  }
@Test public void testTrimToNull() { assertEquals("aCcepTed", NormalizeUtils.trimToNull("aCcepTed ")); assertEquals("nuller", NormalizeUtils.trimToNull("nuller ")); assertNull(NormalizeUtils.trimToNull("NuLL ")); assertNull(NormalizeUtils.trimToNull(" ")); assertNull(NormalizeUtils.trimToNull(" NULL ")); assertNull(NormalizeUtils.trimToNull(" ")); assertNull(NormalizeUtils.trimToNull("\\N ")); }