public void testCycListPrettyStringDetails() {
    System.out.println("\n*** testCycListPrettyStringDetails ***");
    try {
      CycList example = null;
      Map<ArgPosition, Span> map = null;
      ArgPosition curPos = null;
      example = (CycList) org.opencyc.parser.CycLParserUtil.parseCycLTerm("(#$isa #$Muffet #$Dog)", true, getCyc());
      map = example.getPrettyStringDetails();
      checkPrettyStringDetail(map, ArgPosition.TOP, 0, 16);
      checkPrettyStringDetail(map, new ArgPosition(0), 1, 4);
      checkPrettyStringDetail(map, new ArgPosition(1), 5, 11);
      checkPrettyStringDetail(map, new ArgPosition(2), 12, 15);

      example = (CycList) org.opencyc.parser.CycLParserUtil.parseCycLTerm(
              "(#$isa (#$InstanceNamedFn \"Muffet\" (#$JuvenileFn #$Dog)) (#$JuvenileFn #$Dog))",
              true, getCyc());
      map = example.getPrettyStringDetails();
      checkPrettyStringDetail(map, ArgPosition.TOP, 0, 74);
      checkPrettyStringDetail(map, new ArgPosition(0), 1, 4);
      checkPrettyStringDetail(map, new ArgPosition(1, 0), 8, 23);
      checkPrettyStringDetail(map, new ArgPosition(1, 1), 24, 32);
      curPos = new ArgPosition(1, 2);
      curPos.extend(0);
      checkPrettyStringDetail(map, curPos, 38, 48);
      curPos = new ArgPosition(1, 2);
      curPos.extend(1);
      checkPrettyStringDetail(map, curPos, 49, 52);
      checkPrettyStringDetail(map, new ArgPosition(1, 2), 37, 53);
      checkPrettyStringDetail(map, new ArgPosition(1), 7, 54);
      checkPrettyStringDetail(map, new ArgPosition(2, 0), 58, 68);
      checkPrettyStringDetail(map, new ArgPosition(2, 1), 69, 72);
      checkPrettyStringDetail(map, new ArgPosition(2), 57, 73);

      final CycList<String> testList = new CycList<String>();
      final StringBuffer stringBuffer = new StringBuffer();
      stringBuffer.append('"');
      stringBuffer.append("abc");
      testList.add(stringBuffer.toString());
      final String testEscapedCyclifiedString = testList.toPrettyEscapedCyclifiedString("");
      assertEquals("(\"\\\"abc\")", testEscapedCyclifiedString);
    } catch (Exception e) {
      failWithException(e);
    }


    System.out.println("*** testCycListPrettyStringDetails OK ***");
  }