public static void dump(String name, Object obj, String prefix, StringBuilder builder)
  {
    try
    {
      traverse(obj, new DumpTraverseCallback(name, prefix, builder));
    }
    catch (IOException e)
    {
      builder.append("( Exception: ").append(e).append(" )");
    }
  }
@Test
  public void testDump()
  {
    StringBuilder sb1 = new StringBuilder();
    Data.dump("map", referenceDataMap1, "  ", sb1);
    assertEquals(sb1.toString(), referenceDump1);
    assertEquals(Data.dump("map", referenceDataMap1, "  ").toString(), referenceDump1);

    StringBuilder sb2 = new StringBuilder();
    Data.dump("", new DataMap(), "", sb2);
    assertEquals(sb2.toString(), "{}\n");

    String s3 = Data.dump(null, new DataList(), "");
    assertEquals(s3, "[]\n");
  }