Browse souce code repository at: https://github.com/jjYBdx4IL/java-evaluation/blob/master/src/test/java/org/json/OrgJSONTest.java
package org.json;

/*
 * #%L
 * Evaluation
 * %%
 * Copyright (C) 2014 Github jjYBdx4IL Projects
 * %%
 * #L%
 */

import org.json.JSONObject;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;

/**
 *
 * @author Github jjYBdx4IL Projects
 */
public class OrgJSONTest {

    JSONObject o;

    @Before
    public void before() {
        o = new JSONObject();
    }

    @Test
    public void testJSONObjectPut() {
        o.put("key", "value");
        assertEquals("{\"key\":\"value\"}", o.toString());
    }

    @Test
    public void testJSONObjectAppend() {
        o.append("key", "value");
        assertEquals("{\"key\":[\"value\"]}", o.toString());
    }

    @Test
    public void testJSONDecode() {
        o = new JSONObject("{\"key\":\"value\"}");
        assertEquals("value", o.get("key"));
    }
}
-------------------------------------------------------------------------------
Test set: org.json.OrgJSONTest
-------------------------------------------------------------------------------
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 s - in org.json.OrgJSONTest
testJSONDecode  Time elapsed: 0 s
testJSONObjectPut  Time elapsed: 0 s
testJSONObjectAppend  Time elapsed: 0 s