@Test
public void testNormalizeWhitespace() {

    Assert.assertEquals("", TextUtils.normalizeWhitespace(" "));
    Assert.assertEquals("hello", TextUtils.normalizeWhitespace("hello "));
    Assert.assertEquals("hello", TextUtils.normalizeWhitespace(" hello"));
    Assert.assertEquals("hello", TextUtils.normalizeWhitespace(" hello "));
    Assert.assertEquals("hello\nworld", TextUtils.normalizeWhitespace("hello \n \n world"));
}