### Question:
LengthlessEncryptedChunkEncoder implements EncryptedChunkEncoder { @Override public void writeChunkToWriter(BackupWriter writer, EncryptedChunk chunk) throws IOException { writer.writeBytes(chunk.nonce()); writer.writeBytes(chunk.encryptedBytes()); }  @Override void writeChunkToWriter(BackupWriter writer, EncryptedChunk chunk); @Override int getEncodedLengthOfChunk(EncryptedChunk chunk); @Override @ChunkOrderingType int getChunkOrderingType();  }### Answer:
@Test public void writeChunkToWriter_writesNonceThenData() throws Exception { mEncoder.writeChunkToWriter(mMockBackupWriter, mTestChunk); InOrder inOrder = inOrder(mMockBackupWriter); inOrder.verify(mMockBackupWriter).writeBytes(TEST_NONCE); inOrder.verify(mMockBackupWriter).writeBytes(TEST_DATA); }