### Question:
OrientDBClient extends DB { @Override public Status insert(String table, String key, HashMap<String, ByteIterator> values) { try { final ODocument document = new ODocument(CLASS); for (Entry<String, String> entry : StringByteIterator.getStringMap(values).entrySet()) { document.field(entry.getKey(), entry.getValue()); } document.save(); dictionary.put(key, document); 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 insertTest() { String insertKey = "user0"; Map<String, ByteIterator> insertMap = insertRow(insertKey); ODocument result = orientDBDictionary.get(insertKey); assertTrue("Assert a row was inserted.", result != null); for (int i = 0; i < NUM_FIELDS; i++) { assertEquals("Assert all inserted columns have correct values.", result.field(FIELD_PREFIX + i), insertMap.get(FIELD_PREFIX + i).toString()); } }