public abstract boolean hasError();
@Test
  public void testPretty() throws UnsupportedEncodingException, IOException
  {
    String schemaText =
      "{ " +
      "  \"type\": \"record\"," +
      "  \"name\": \"LongList\"," +
      "  \"fields\" : [" +
      "    {\"name\": \"value\", \"type\": \"long\"}, " +
      "    {\"name\": \"next\", \"type\": [\"LongList\", \"null\"]} " +
      "  ]" +
      "}";

    String br = System.getProperty("line.separator");
    Object[][] testData =
    {
        {
          JsonBuilder.Pretty.COMPACT,
          "{\"type\":\"record\",\"name\":\"LongList\",\"fields\":[{\"name\":\"value\",\"type\":\"long\"},{\"name\":\"next\",\"type\":[\"LongList\",\"null\"]}]}"
        },
        {
          JsonBuilder.Pretty.SPACES,
          "{ \"type\" : \"record\", \"name\" : \"LongList\", \"fields\" : [ { \"name\" : \"value\", \"type\" : \"long\" }, { \"name\" : \"next\", \"type\" : [ \"LongList\", \"null\" ] } ] }"
        },
        {
          JsonBuilder.Pretty.INDENTED,
          "{" + br +
          "  \"type\" : \"record\"," + br +
          "  \"name\" : \"LongList\"," + br +
          "  \"fields\" : [ {" + br +
          "    \"name\" : \"value\"," + br +
          "    \"type\" : \"long\"" + br +
          "  }, {" + br +
          "    \"name\" : \"next\"," + br +
          "    \"type\" : [ \"LongList\", \"null\" ]" + br +
          "  } ]" + br +
          "}"
        },
    };

    for (Object[] input : testData)
    {
      PegasusSchemaParser parser = schemaParserFromString(schemaText);
      String result;
      if (parser.hasError())
      {
        result = "ERROR: " + parser.errorMessage();
      }
      else
      {
        result = SchemaToJsonEncoder.schemasToJson(parser.topLevelDataSchemas(), (JsonBuilder.Pretty) input[0]);
      }
      if (input[1] != null)
      {
        assertEquals(result, input[1]);
      }
      else
      {
        out.println(result);
      }
    }
  }