private ExpandSelectTreeNode getSelectExpandTree(final String pathSegment, final String selectString,
final String expandString) throws Exception {
Edm edm = RuntimeDelegate.createEdm(new EdmTestProvider());
UriParserImpl uriParser = new UriParserImpl(edm);
List<PathSegment> pathSegments = new ArrayList<PathSegment>();
pathSegments.add(new ODataPathSegmentImpl(pathSegment, null));
Map<String, String> queryParameters = new HashMap<String, String>();
if (selectString != null) {
queryParameters.put("$select", selectString);
}
if (expandString != null) {
queryParameters.put("$expand", expandString);
}
UriInfo uriInfo = uriParser.parse(pathSegments, queryParameters);
ExpandSelectTreeCreator expandSelectTreeCreator =
new ExpandSelectTreeCreator(uriInfo.getSelect(), uriInfo.getExpand());
ExpandSelectTreeNode expandSelectTree = expandSelectTreeCreator.create();
assertNotNull(expandSelectTree);