public static String trim(final String str) {
        return str == null ? null : str.trim();
    }
@Test
    public void testTrim() {
        assertThat(StringUtils.trim(null)).isNull();
        assertThat(StringUtils.trim("abc")).isEqualTo("abc");
        assertThat(StringUtils.trim("")).isEqualTo("");
        assertThat(StringUtils.trim(" ")).isEqualTo("");
    }