### Question:
ElasticsearchClient extends DB { @Override public Status scan( String table, String startkey, int recordcount, Set<String> fields, Vector<HashMap<String, ByteIterator>> result) { try { final RangeQueryBuilder rangeQuery = rangeQuery("_id").gte(startkey); final SearchResponse response = client.prepareSearch(indexKey) .setTypes(table) .setQuery(rangeQuery) .setSize(recordcount) .execute() .actionGet(); HashMap<String, ByteIterator> entry; for (SearchHit hit : response.getHits()) { entry = new HashMap<>(fields.size()); for (String field : fields) { entry.put(field, new StringByteIterator((String) hit.getSource().get(field))); } result.add(entry); } return Status.OK; } catch (Exception e) { e.printStackTrace(); return Status.ERROR; } }  @Override void init(); @Override void cleanup(); @Override Status insert(String table, String key, HashMap<String, ByteIterator> values); @Override Status delete(String table, String key); @Override Status read(String table, String key, Set<String> fields, HashMap<String, ByteIterator> result); @Override Status update(String table, String key, HashMap<String, ByteIterator> values); @Override Status scan(
          String table,
          String startkey,
          int recordcount,
          Set<String> fields,
          Vector<HashMap<String, ByteIterator>> result);  }### Answer:
@Test public void testScan() { System.out.println("scan"); int recordcount = 10; Set<String> fields = MOCK_DATA.keySet(); Vector<HashMap<String, ByteIterator>> resultParam = new Vector<HashMap<String, ByteIterator>>(10); Status result = instance.scan(MOCK_TABLE, MOCK_KEY1, recordcount, fields, resultParam); assertEquals(Status.OK, result); }