Already checking this: assertEquals(data, writtenBuf);