DemoRelatedEntity relatedEntity = new DemoRelatedEntity("NewOrder");
demoItem jpaEntity = new demoItem("laptop", 1);
jpaEntity.setRelatedEntity(relatedEntity);
List<EdmNavigationProperty> navigationPropertyList = new ArrayList<EdmNavigationProperty>();
// Mocking a navigation property and its mapping object
EdmNavigationProperty navigationProperty = EasyMock.createMock(EdmNavigationProperty.class);
EdmMapping edmMapping = EasyMock.createMock(EdmMapping.class);
try {
EasyMock.expect(edmMapping.getInternalName()).andStubReturn("relatedEntity");
EasyMock.replay(edmMapping);
EasyMock.expect(navigationProperty.getName()).andStubReturn("RelatedEntities");
EasyMock.expect(navigationProperty.getMapping()).andStubReturn(edmMapping);
EasyMock.replay(navigationProperty);
} catch (EdmException e) {
fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2);
}