@Test
public void testChain() throws Exception {

    StringBuilder sb = new StringBuilder();
    assertFalse(RenderKitUtils.chain(sb, "", false));
    assertTrue(sb.length() == 0);
    assertFalse(RenderKitUtils.chain(sb, null, false));
    assertTrue(sb.length() == 0);
    assertFalse(RenderKitUtils.chain(sb, "test", false));
    assertEquals("test", sb.toString());
    assertFalse(RenderKitUtils.chain(sb, "", false));
    assertEquals("test", sb.toString());
    assertTrue(RenderKitUtils.chain(sb, "another'object", false));
    assertEquals("'test','another\\'object'", sb.toString());
    assertTrue(RenderKitUtils.chain(sb, "one more", true));
    assertEquals("'test','another\\'object','one more'", sb.toString());
}