@Test public void testToStringTest() throws Exception { Snapshot snap = new Snapshot(field, 'b', 2, '0'); String exp1 = "{\'status\':\'snapshot\',\'next\':\'0\',\'color\':\'b\',\'field\':[[\'black\', " + "\'nothing\'], [\'black\', \'white\']],\'king\':[[\'true\', \'false\'], [\'false\', \'true\']]}"; Assert.assertEquals(snap.toStringTest(), exp1); snap = new Snapshot(field, 'w', 2, '0'); String exp2 = "{\'status\':\'snapshot\',\'next\':\'0\',\'color\':\'w\',\'field\':[[\'black\', " + "\'nothing\'], [\'black\', \'white\']],\'king\':[[\'true\', \'false\'], [\'false\', \'true\']]}"; Assert.assertEquals(snap.toStringTest(), exp2); }