EdmEntitySet edmEntitySet = EasyMock.createMock(EdmEntitySet.class);
EdmEntityType edmEntityType = EasyMock.createMock(EdmEntityType.class);
List<SelectItem> selectItemList = null;
// Setting up the expected value
KeyPredicate keyPredicate = EasyMock.createMock(KeyPredicate.class);
EdmProperty kpProperty = EasyMock.createMock(EdmProperty.class);
EdmSimpleType edmType = EasyMock.createMock(EdmSimpleType.class);
EdmMapping edmMapping = EasyMock.createMock(EdmMapping.class);
EasyMock.expect(edmMapping.getInternalName()).andStubReturn("Field1");
EasyMock.expect(keyPredicate.getLiteral()).andStubReturn("1");
try {
EasyMock.expect(kpProperty.getName()).andStubReturn("Field1");
EasyMock.expect(kpProperty.getType()).andStubReturn(edmType);
EasyMock.expect(kpProperty.getMapping()).andStubReturn(edmMapping);
} catch (EdmException e2) {
fail("this should not happen");
}
EasyMock.expect(keyPredicate.getProperty()).andStubReturn(kpProperty);
EasyMock.replay(edmMapping, edmType, kpProperty, keyPredicate);
EasyMock.expect(getEntityView.getTargetEntitySet()).andStubReturn(edmEntitySet);
EasyMock.expect(getEntityView.getSelect()).andStubReturn(selectItemList);
EasyMock.expect(edmEntitySet.getEntityType()).andStubReturn(edmEntityType);