### Question:
JsonValueSource implements Source { public void discard() throws IOException { closed = true; while (state != STATE_END_OF_JSON) { advanceLimit(8192); source.skip(limit); } } JsonValueSource(BufferedSource source);   JsonValueSource(BufferedSource source, Buffer prefix, ByteString state, int stackSize); void discard(); @Override long read(Buffer sink, long byteCount); @Override Timeout timeout(); @Override void close();  }### Answer:
@Test public void discard() throws IOException { Buffer allData = new Buffer(); allData.writeUtf8("{\"a\",\"b\",\"c\"},[\"d\", \"e\"]"); JsonValueSource jsonValueSource = new JsonValueSource(allData); jsonValueSource.close(); jsonValueSource.discard(); assertThat(allData.readUtf8()).isEqualTo(",[\"d\", \"e\"]"); }