@Test
public void testBuilderAppend() {

  Configuration conf = new Configuration();
  conf.set(HADOOP_CALLER_CONTEXT_SEPARATOR_KEY, "$");
  CallerContext.Builder builder = new CallerContext.Builder(null, conf);
  CallerContext context = builder.append("context1")
      .append("context2").append("key3", "value3").build();
  Assert.assertEquals(true,
      context.getContext().contains("$"));
  String[] items = context.getContext().split("\\$");
  Assert.assertEquals(3, items.length);
  Assert.assertEquals("key3:value3", items[2]);
  builder.append("$$");
  Assert.assertEquals("context1$context2$key3:value3$$$",
      builder.build().getContext());
}