@Test
public void mapToNewDocExistingRevision() throws ConflictException {

    Map<String, Object> map = new HashMap<String, Object>();
    map.put(DocumentUtil.TAG_ID, "client-assigned-id");
    map.put(DocumentUtil.TAG_REV, "100");
    map.put("firstname", "John");
    ODocument result = DocumentUtil.toDocument(map, null, db, orientDocClass);
    
    assertEquals(result.field(DocumentUtil.ORIENTDB_PRIMARY_KEY), "client-assigned-id", "unexpected ID");
    assertEquals(result.field("firstname"), "John", "unexpected firstname");
    assertEquals(result.getVersion(), 100, "Version not as expected");
}