### Question:
DomainAccessor { public HankResponse get(ByteBuffer key, ReaderResult result) throws IOException { HankTimer timer = getRequestsTimerAggregator.getTimer(); try { int partition = partitioner.partition(key, partitionAccessors.length); PartitionAccessor partitionAccessor = partitionAccessors[partition]; if (partitionAccessor == null) { LOG.error("Failed to perform get because of an Exception: wrong host for domain: " + hostDomain.getDomain().getName() + ", partition: " + partition + ", key: " + BytesUtils.bytesToHexString(key) + ", response: " + WRONG_HOST); return WRONG_HOST; } return partitionAccessor.get(key, result); } finally { getRequestsTimerAggregator.add(timer); } } DomainAccessor(HostDomain hostDomain,
                 PartitionAccessor[] partitionAccessors,
                 Partitioner partitioner,
                 int getTimerAggregatorWindow); HankResponse get(ByteBuffer key, ReaderResult result); String getName(); HostDomain getHostDomain(); void shutDown(); RuntimeStatisticsAggregator getRuntimeStatistics();  }### Answer:
@Test public void testSetUpAndServe() throws Exception { PartitionAccessor partitionAccessors[] = new PartitionAccessor[1]; ByteBuffer key = ByteBuffer.wrap("key".getBytes()); ByteBuffer nullKey = ByteBuffer.wrap("nullKey".getBytes()); partitionAccessors[0] = new PartitionAccessor(new MockHostDomainPartition(0, 1), new MockReader(null, 1, "v".getBytes(), null)); DomainAccessor drs = new DomainAccessor(new MockHostDomain(new MockDomain("domain")), partitionAccessors, new MapPartitioner(key, 0, nullKey, 0), 0); drs.get(key, new ReaderResult()); drs.get(nullKey, new ReaderResult()); }