### Question:
DiffScriptBackupWriter implements BackupWriter { @Override public void writeBytes(byte[] bytes) throws IOException { for (byte b : bytes) { mWriter.writeByte(b); } mBytesWritten += bytes.length; } @VisibleForTesting  DiffScriptBackupWriter(SingleStreamDiffScriptWriter writer); static DiffScriptBackupWriter newInstance(OutputStream outputStream); @Override void writeBytes(byte[] bytes); @Override void writeChunk(long start, int length); @Override long getBytesWritten(); @Override void flush();  }### Answer:
@Test public void writeBytes_writesBytesToWriter() throws Exception { mBackupWriter.writeBytes(TEST_BYTES); verify(mDiffScriptWriter, atLeastOnce()).writeByte(mBytesCaptor.capture()); assertThat(mBytesCaptor.getAllValues()) .containsExactlyElementsIn(Bytes.asList(TEST_BYTES)) .inOrder(); }