@Test
public void truncateShouldProperlyTruncateStringWithLengthGreaterThanMaximumLengthAndMaximumLengthLongerThanPrefixLength() {

    String str = "This is the string";
    assertThat(StringUtil.truncate(str, 2), is(".."));
    assertThat(StringUtil.truncate(str, 2, null), is(".."));
    assertThat(StringUtil.truncate(str, 1, "XX"), is("X"));
}