import org.easymock.EasyMock;
public class EdmMockUtil {
public static ExpandSelectTreeNode mockExpandSelectTreeNode() {
ExpandSelectTreeNode nextExpandNode = EasyMock.createMock(ExpandSelectTreeNode.class);
Map<String, ExpandSelectTreeNode> nextLink = null;
EasyMock.expect(nextExpandNode.getLinks()).andStubReturn(nextLink);
EasyMock.replay(nextExpandNode);
ExpandSelectTreeNode expandNode = EasyMock.createMock(ExpandSelectTreeNode.class);
Map<String, ExpandSelectTreeNode> links = new HashMap<String, ExpandSelectTreeNode>();
links.put("SalesOrderLineItemDetails", nextExpandNode);
EasyMock.expect(expandNode.getLinks()).andStubReturn(links);
List<EdmProperty> edmPropertyList = new ArrayList<EdmProperty>();
edmPropertyList.add(mockEdmPropertyOfTarget());
EasyMock.expect(expandNode.getProperties()).andReturn(edmPropertyList).anyTimes();
EasyMock.replay(expandNode);
return expandNode;
}