src/test/java/com/stijndepestel/geminio/PersisterTest.java
/**
     * Test if a JSONObject is provided to the output stream as it should be.
     *
     * @throws IOException
     *             when an IO error occurs during persisting.
     */
Test if a JSONObject is provided to the output stream as it should be.
@throws IOException
when an IO error occurs during persisting.
Test if a JSONObject is provided to the output stream as it should be . @throws IOException when an IO error occurs during persisting .
@Test
    public void persistTest() throws IOException {
        final String json = "{\"ping\":\"pong\"}";
        final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
        new Persister(outputStream).persist(new JSONObject(json));
        Assert.assertEquals("JSON strings should be equal", json,
                outputStream.toString());
    }
@ Test public void persistTest ( ) throws IOException { final String json = "{\"ping\":\"pong\"}" ; final ByteArrayOutputStream outputStream = new ByteArrayOutputStream ( ) ; new Persister ( outputStream ) . persist ( new JSONObject ( json ) ) ; Assert . assertEquals ( "JSON strings should be equal" , json , outputStream . toString ( ) ) ; }
Test if a JSONObject is provided to the output stream as it should be.
Test if a JSONObject is provided to the output stream as it should be .