void () { assertEquals("my-string", StringUtil.strip("\n my -string ", CharFilter.NOT_WHITESPACE_FILTER)); assertEquals("my-string", StringUtil.strip("my- string", CharFilter.NOT_WHITESPACE_FILTER)); assertEquals("my-string", StringUtil.strip("my-string", CharFilter.NOT_WHITESPACE_FILTER)); assertEquals("\n ", StringUtil.strip("\n my string ", CharFilter.WHITESPACE_FILTER)); assertEquals("", StringUtil.strip("", CharFilter.WHITESPACE_FILTER)); assertEquals("", StringUtil.strip("\n my string ", ch -> false)); assertEquals("\n my string ", StringUtil.strip("\n my string ", ch -> true)); }