@Test
public void nullsAreSerializedOnPretty() {

    JSONObject obj = new JSONObject("{\"key1\": \"value\", \"key2\": null}");
    assertEquals("{\n" +
            "  \"key1\": \"value\",\n" +
            "  \"key2\": null\n" +
            "}", obj.toString(3));
}