@Test
public void testEDBObjectToModelConversion_shouldWork() throws Exception {

    EDBObject object = new EDBObject("test");
    object.putEDBObjectEntry(EDBConstants.MODEL_TYPE, TestModel.class.getName());
    object.putEDBObjectEntry(EDBConstants.MODEL_OID, "test");
    object.putEDBObjectEntry(EDBConstants.MODEL_VERSION, Integer.valueOf(1));
    object.putEDBObjectEntry("id", "test");
    object.putEDBObjectEntry("name", "testname");
    object.putEDBObjectEntry("number", 42);
    object.putEDBObjectEntry("check", false);
    object.putEDBObjectEntry("check2", true);
    TestModel model = converter.convertEDBObjectToModel(TestModel.class, object);
    assertThat(model.getId(), is("test"));
    assertThat(model.getName(), is("testname"));
    assertThat(model.isCheck(), is(false));
    assertThat(model.isCheck2(), is(true));
    Object version = ModelWrapper.wrap(model).retrieveInternalModelVersion();
    assertThat(version, notNullValue());
    assertThat((Integer) version, is(1));
}