### Question:
EchoReader implements Reader { @Override public void get(ByteBuffer key, ReaderResult result) throws IOException { StringBuilder sb = new StringBuilder(); sb.append("Original value: "); sb.append(BytesUtils.bytesToHexString(key)); sb.append(" Assigned to partition number: "); sb.append(partNum); byte[] bytes = sb.toString().getBytes(); result.requiresBufferSize(bytes.length); System.arraycopy(bytes, 0, result.getBuffer().array(), 0, bytes.length); result.found(); } EchoReader(int partNum); @Override void get(ByteBuffer key, ReaderResult result); @Override Integer getVersionNumber(); @Override CacheStatistics getCacheStatistics(); @Override void close();  }### Answer:
@Test public void testIt() throws Exception { EchoReader r = new EchoReader(57); ReaderResult result = new ReaderResult(); r.get(ByteBuffer.wrap(new byte[]{1, 2, 3}), result); assertTrue(result.isFound()); assertEquals("Original value: 01 02 03 Assigned to partition number: 57", new String(result.getBuffer().array())); }