### Question:
BaseBitmapWriter implements BitMapWriter { @Override public void put(long pos, ImmutableBitMap val) { val.writeBytes(byteArrayWriter.putStream(pos)); } BaseBitmapWriter(ByteArrayWriter byteArrayWriter); @Override void resetContentPosition(); @Override void put(long pos, ImmutableBitMap val); @Override void release();  }### Answer:
@Test public void put() { ImmutableBitMap bitmap = mock(ImmutableBitMap.class); OutputStream output = mock(OutputStream.class); when(byteArrayWriter.putStream(1)).thenReturn(output); new BaseBitmapWriter(byteArrayWriter).put(1, bitmap); verify(bitmap).writeBytes(output); }