rootChild2.setChildren(child2Children);
ConnectorInformation id = getTestConnectorInformation();
// test
List<EDBObject> objects = converter.convertModelToEDBObject(root, id);
// assert
EDBObject obj = objects.get(5);
assertThat(obj.getString("id"), is("root"));
assertThat(obj.getString(EDBConstants.MODEL_TYPE), is(RecursiveModel.class.getName()));
assertThat(obj.getString("children.0"), is(ModelWrapper.wrap(rootChild1).getCompleteModelOID()));
assertThat(obj.getString("children.1"), is(ModelWrapper.wrap(rootChild2).getCompleteModelOID()));
obj = objects.get(4);
assertThat(obj.getString("id"), is("root_child2"));
assertThat(obj.getString(EDBConstants.MODEL_TYPE), is(RecursiveModel.class.getName()));
assertThat(obj.getString("children.0"), is(ModelWrapper.wrap(child2Child1).getCompleteModelOID()));
assertThat(obj.getString("children.1"), is(ModelWrapper.wrap(child2Child2).getCompleteModelOID()));
obj = objects.get(3);
assertThat(obj.getString("id"), is("child2_child2"));
assertThat(obj.getString(EDBConstants.MODEL_TYPE), is(RecursiveModel.class.getName()));
obj = objects.get(2);
assertThat(obj.getString("id"), is("child2_child1"));
assertThat(obj.getString(EDBConstants.MODEL_TYPE), is(RecursiveModel.class.getName()));
obj = objects.get(1);
assertThat(obj.getString("id"), is("root_child1"));
assertThat(obj.getString(EDBConstants.MODEL_TYPE), is(RecursiveModel.class.getName()));
assertThat(obj.getString("child"), is(ModelWrapper.wrap(child1Child1).getCompleteModelOID()));
obj = objects.get(0);
assertThat(obj.getString("id"), is("child1_child1"));
assertThat(obj.getString(EDBConstants.MODEL_TYPE), is(RecursiveModel.class.getName()));
}