@Test
public void testReplaceAllInstancesOfBoundedString() {

    assertEquals("", TextUtils.replaceBoundedString("", PREFIX, SUFFIX, REPLACEMENT));
    assertEquals("", TextUtils.replaceBoundedString("", PREFIX, "", REPLACEMENT));
    assertEquals("", TextUtils.replaceBoundedString("", "", "", REPLACEMENT));
    DEF_GEN.setExpectedMatches("");
    assertEquals(REPLACEMENT, TextUtils.replaceBoundedString("PREFIXSUF", PREFIX, SUFFIX, DEF_GEN));
    DEF_GEN.setExpectedMatches("bbbbb");
    assertEquals("aaaaREPLACEMENTccccc", TextUtils.replaceBoundedString("aaaaPREFIXbbbbbSUFccccc", PREFIX, SUFFIX, DEF_GEN));
    DEF_GEN.setExpectedMatches((String) null);
    assertEquals("aaaPREFIXbbbbSUFF", TextUtils.replaceBoundedString("aaaPREFIXbbbbSUFF", PREFIX, "SUFFI", DEF_GEN));
    assertEquals("aRcccReeeR", TextUtils.replaceBoundedString("aPbbScccPdSeeePS", "P", "S", "R"));
}