### Question:
NameUtils { public static String normaliseName(final String name) { if (Objects.isNull(name)) { return ""; } String value = name; if (StringUtils.nonEmpty(value)) { value = value.trim(); value = value.replaceAll(NORMALIZE_TO_SINGLE_WHITE_SPACE, WHITESPACE_STRING); } return value; } private  NameUtils(); static String normaliseName(final String name);  }### Answer:
@Test public void testNull() { assertThat(NameUtils.normaliseName(null)).isEmpty(); }
@Test public void testEmpty() { assertThat(NameUtils.normaliseName("")).isEmpty(); }
@Test public void testLeadingWhitespace() { assertThat(NameUtils.normaliseName(" hello")).isEqualTo("hello"); }
@Test public void testTrailingWhitespace() { assertThat(NameUtils.normaliseName("hello ")).isEqualTo("hello"); }
@Test public void testCompactWhitespace() { assertThat(NameUtils.normaliseName("hello world")).isEqualTo("hello world"); }
@Test public void testCompleteNormalisation() { assertThat(NameUtils.normaliseName(" hello world ")).isEqualTo("hello world"); }