You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ko...@apache.org on 2014/02/20 12:31:46 UTC

[3/6] [OLINGO-63] Uri Parser: add special handling for leading type filter in member, expand, select

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ResourceValidator.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ResourceValidator.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ResourceValidator.java
deleted file mode 100644
index c19b2ae..0000000
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/ResourceValidator.java
+++ /dev/null
@@ -1,571 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.server.core.testutil;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.util.List;
-
-import org.apache.olingo.odata4.commons.api.ODataApplicationException;
-import org.apache.olingo.odata4.commons.api.edm.Edm;
-import org.apache.olingo.odata4.commons.api.edm.EdmElement;
-import org.apache.olingo.odata4.commons.api.edm.EdmType;
-import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.odata4.server.api.uri.UriInfo;
-import org.apache.olingo.odata4.server.api.uri.UriInfoKind;
-import org.apache.olingo.odata4.server.api.uri.UriParameter;
-import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
-import org.apache.olingo.odata4.server.api.uri.UriResourcePartTyped;
-import org.apache.olingo.odata4.server.api.uri.queryoption.CustomQueryOption;
-import org.apache.olingo.odata4.server.api.uri.queryoption.SelectItem;
-import org.apache.olingo.odata4.server.api.uri.queryoption.expression.ExpressionVisitException;
-import org.apache.olingo.odata4.server.core.uri.UriParserException;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceActionImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceComplexPropertyImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceEntitySetImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceFunctionImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceLambdaAllImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceLambdaAnyImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceNavigationPropertyImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourcePrimitivePropertyImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceSingletonImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceWithKeysImpl;
-import org.apache.olingo.odata4.server.core.uri.queryoption.CustomQueryOptionImpl;
-import org.apache.olingo.odata4.server.core.uri.queryoption.ExpandOptionImpl;
-import org.apache.olingo.odata4.server.core.uri.queryoption.SelectOptionImpl;
-import org.apache.olingo.odata4.server.core.uri.queryoption.expression.ExpressionImpl;
-
-public class ResourceValidator implements Validator {
-  private Edm edm;
-  private Validator invokedBy;
-  private UriInfo uriInfo = null;
-
-  private UriResourceImpl uriPathInfo = null;
-  private int uriResourceIndex;
-
-  // --- Setup ---
-
-  public ResourceValidator setUpValidator(final Validator uriValidator) {
-    invokedBy = uriValidator;
-    return this;
-  }
-
-  public ResourceValidator setEdm(final Edm edm) {
-    this.edm = edm;
-    return this;
-  }
-
-  public ResourceValidator setUriInfoImplPath(final UriInfoImpl uriInfoPath) {
-    uriInfo = uriInfoPath;
-    last();
-    return this;
-  }
-
-  // --- Execution ---
-
-  public ResourceValidator run(final String uri) {
-    ParserWithLogging testParser = new ParserWithLogging();
-
-    UriInfoImpl uriInfoTmp = null;
-    uriPathInfo = null;
-    try {
-      uriInfoTmp = (UriInfoImpl) testParser.parseUri(uri, edm);
-    } catch (UriParserException e) {
-      fail("Exception occured while parsing the URI: " + uri + "\n"
-          + " Message: " + e.getMessage());
-    }
-
-    if (uriInfoTmp.getKind() != UriInfoKind.resource) {
-      fail("Invalid UriInfoKind: " + uriInfoTmp.getKind().toString());
-    }
-    uriInfo = uriInfoTmp;
-
-    first();
-    return this;
-  }
-
-  // --- Navigation ---
-
-  public UriValidator goUpUriValidator() {
-    return (UriValidator) invokedBy;
-  }
-
-  public ExpandValidator goUpExpandValidator() {
-    return (ExpandValidator) invokedBy;
-  }
-
-  public FilterValidator goUpFilterValidator() {
-    return (FilterValidator) invokedBy;
-  }
-
-  public FilterValidator goParameter(final int index) {
-    assertEquals(UriResourceKind.function, uriPathInfo.getKind());
-    UriResourceFunctionImpl function = (UriResourceFunctionImpl) uriPathInfo;
-
-    return new FilterValidator()
-        .setEdm(edm)
-        .setExpression(function.getParameters().get(index).getExression())
-        .setValidator(this);
-  }
-
-  public FilterValidator goLambdaExpression() {
-    if (uriPathInfo.getKind() == UriResourceKind.lambdaAll) {
-      return new FilterValidator()
-          .setEdm(edm)
-          .setExpression(((UriResourceLambdaAllImpl) uriPathInfo).getExpression());
-
-    } else if (uriPathInfo.getKind() == UriResourceKind.lambdaAny) {
-      return new FilterValidator()
-          .setEdm(edm)
-          .setExpression(((UriResourceLambdaAnyImpl) uriPathInfo).getExpression());
-    } else {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-    return null;
-  }
-
-  public ResourceValidator goSelectItem(final int index) {
-    SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption();
-
-    SelectItem item = select.getSelectItems().get(index);
-    UriInfoImpl uriInfo1 = (UriInfoImpl) item.getResourceInfo();
-
-    return new ResourceValidator()
-        .setUpValidator(this)
-        .setEdm(edm)
-        .setUriInfoImplPath(uriInfo1);
-
-  }
-
-  public ExpandValidator goExpand() {
-    ExpandOptionImpl expand = (ExpandOptionImpl) uriInfo.getExpandOption();
-    if (expand == null) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    return new ExpandValidator().setUpValidator(this).setExpand(expand);
-  }
-
-  public ResourceValidator first() {
-    uriResourceIndex = 0;
-    uriPathInfo = (UriResourceImpl) uriInfo.getUriResourceParts().get(0);
-    return this;
-  }
-
-  public ResourceValidator last() {
-    uriResourceIndex = 0;
-
-    try {
-      uriPathInfo = (UriResourceImpl) uriInfo.getUriResourceParts().get(uriInfo.getUriResourceParts().size() - 1);
-      uriResourceIndex = uriInfo.getUriResourceParts().size() - 1;
-    } catch (IndexOutOfBoundsException ex) {
-      fail("not enough segments");
-    }
-
-    return this;
-  }
-
-  public ResourceValidator n() {
-    uriResourceIndex++;
-
-    try {
-      uriPathInfo = (UriResourceImpl) uriInfo.getUriResourceParts().get(uriResourceIndex);
-    } catch (IndexOutOfBoundsException ex) {
-      fail("not enough segments");
-    }
-
-    return this;
-  }
-
-  public ResourceValidator at(final int index) {
-    uriResourceIndex = index;
-    try {
-      uriPathInfo = (UriResourceImpl) uriInfo.getUriResourceParts().get(index);
-    } catch (IndexOutOfBoundsException ex) {
-      fail("not enough segments");
-    }
-    return this;
-  }
-
-  // --- Validation ---
-
-  public ResourceValidator isLambdaVar(final String var) {
-    String actualVar = null;
-    if (uriPathInfo.getKind() == UriResourceKind.lambdaAll) {
-      actualVar = ((UriResourceLambdaAllImpl) uriPathInfo).getLamdaVariable();
-    } else if (uriPathInfo.getKind() == UriResourceKind.lambdaAny) {
-      actualVar = ((UriResourceLambdaAnyImpl) uriPathInfo).getLamdaVariable();
-    } else {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    assertEquals(var, actualVar);
-    return this;
-  }
-
-  public ResourceValidator isTypeFilter(final FullQualifiedName expectedType) {
-
-    if (uriPathInfo.getKind() != UriResourceKind.complexProperty &&
-        uriPathInfo.getKind() != UriResourceKind.singleton &&
-        uriPathInfo.getKind() != UriResourceKind.startingTypeFilter) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    EdmType actualType = null;
-    if (uriPathInfo instanceof UriResourceComplexPropertyImpl) {
-      actualType = ((UriResourceComplexPropertyImpl) uriPathInfo).getComplexTypeFilter();
-    } else if (uriPathInfo instanceof UriResourceSingletonImpl) {
-      actualType = ((UriResourceSingletonImpl) uriPathInfo).getEntityTypeFilter();
-    }
-
-    if (actualType == null) {
-      fail("type information not set");
-    }
-
-    FullQualifiedName actualName = new FullQualifiedName(actualType.getNamespace(), actualType.getName());
-
-    assertEquals(expectedType.toString(), actualName.toString());
-    return this;
-  }
-
-  public ResourceValidator isType(final FullQualifiedName type) {
-    if (!(uriPathInfo instanceof UriResourcePartTyped)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-    UriResourcePartTyped uriPathInfoTyped = (UriResourcePartTyped) uriPathInfo;
-
-    EdmType actualType = uriPathInfoTyped.getType();
-    if (actualType == null) {
-      fail("type information not set");
-    }
-
-    FullQualifiedName actualName = new FullQualifiedName(actualType.getNamespace(), actualType.getName());
-
-    assertEquals(type.toString(), actualName.toString());
-
-    return this;
-  }
-
-  public ResourceValidator isType(final FullQualifiedName type, final boolean isFinallyACollection) {
-    isType(type);
-    assertEquals(isFinallyACollection, ((UriResourcePartTyped) uriPathInfo).isCollection());
-    return this;
-  }
-
-  public ResourceValidator isTypeFilterOnEntry(final FullQualifiedName type) {
-    if (!(uriPathInfo instanceof UriResourceWithKeysImpl)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    UriResourceWithKeysImpl uriPathInfoKeyPred = (UriResourceWithKeysImpl) uriPathInfo;
-
-    // input parameter type may be null in order to assert that the singleTypeFilter is not set
-    EdmType actualType = uriPathInfoKeyPred.getTypeFilterOnEntry();
-    if (type == null) {
-      assertEquals(type, actualType);
-    } else {
-      assertEquals(type.toString(), new FullQualifiedName(actualType.getNamespace(), actualType.getName()).toString());
-    }
-
-    return this;
-  }
-
-  public ResourceValidator isTypeFilterOnCollection(final FullQualifiedName expectedType) {
-    if (!(uriPathInfo instanceof UriResourceWithKeysImpl)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-    UriResourceWithKeysImpl uriPathInfoKeyPred = (UriResourceWithKeysImpl) uriPathInfo;
-
-    // input parameter type may be null in order to assert that the collectionTypeFilter is not set
-    EdmType actualType = uriPathInfoKeyPred.getTypeFilterOnCollection();
-    if (expectedType == null) {
-      assertEquals(expectedType, actualType);
-    } else {
-      FullQualifiedName actualName = new FullQualifiedName(actualType.getNamespace(), actualType.getName());
-      assertEquals(expectedType.toString(), actualName.toString());
-    }
-
-    return this;
-  }
-
-  // other functions
-  public ResourceValidator checkCustomParameter(final int index, final String name, final String value) {
-    if (uriInfo == null) {
-      fail("hasQueryParameter: uriInfo == null");
-    }
-
-    List<CustomQueryOption> list = uriInfo.getCustomQueryOptions();
-    if (list.size() <= index) {
-      fail("not enough queryParameters");
-    }
-
-    CustomQueryOptionImpl option = (CustomQueryOptionImpl) list.get(index);
-    assertEquals(name, option.getName());
-    assertEquals(value, option.getText());
-    return this;
-  }
-
-  // TODO remove
-  public ResourceValidator isCollection(final boolean isCollection) {
-    if (!(uriPathInfo instanceof UriResourcePartTyped)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-    UriResourcePartTyped uriPathInfoTyped = (UriResourcePartTyped) uriPathInfo;
-
-    EdmType type = uriPathInfoTyped.getType();
-    if (type == null) {
-      fail("isCollection: type == null");
-    }
-    assertEquals(isCollection, uriPathInfoTyped.isCollection());
-    return this;
-  }
-
-  public ResourceValidator isFilterString(final String expectedFilterTreeAsString) {
-
-    ExpressionImpl filterTree = (ExpressionImpl) uriInfo.getFilterOption().getExpression();
-    try {
-      String filterTreeAsString = filterTree.accept(new FilterTreeToText());
-      assertEquals(expectedFilterTreeAsString, filterTreeAsString);
-    } catch (ExpressionVisitException e) {
-      fail("isFilterString: Exception " + e.getMessage() + " occured");
-    } catch (ODataApplicationException e) {
-      fail("isFilterString: Exception " + e.getMessage() + " occured");
-    }
-
-    return this;
-  }
-
-  public ResourceValidator isKeyPredicateRef(final int index, final String name, final String refencedProperty) {
-    if (!(uriPathInfo instanceof UriResourceWithKeysImpl)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    UriResourceWithKeysImpl info = (UriResourceWithKeysImpl) uriPathInfo;
-    List<UriParameter> keyPredicates = info.getKeyPredicates();
-    assertEquals(name, keyPredicates.get(index).getName());
-    assertEquals(refencedProperty, keyPredicates.get(index).getRefencedProperty());
-    return this;
-
-  }
-
-  public ResourceValidator isKeyPredicate(final int index, final String name, final String text) {
-    if (!(uriPathInfo instanceof UriResourceWithKeysImpl)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    UriResourceWithKeysImpl info = (UriResourceWithKeysImpl) uriPathInfo;
-    List<UriParameter> keyPredicates = info.getKeyPredicates();
-    assertEquals(name, keyPredicates.get(index).getName());
-    assertEquals(text, keyPredicates.get(index).getText());
-    return this;
-
-  }
-
-  public ResourceValidator isParameter(final int index, final String name, final String text) {
-    if (!(uriPathInfo instanceof UriResourceFunctionImpl)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    UriResourceFunctionImpl info = (UriResourceFunctionImpl) uriPathInfo;
-    List<UriParameter> keyPredicates = info.getParameters();
-    assertEquals(name, keyPredicates.get(index).getName());
-    assertEquals(text, keyPredicates.get(index).getText());
-    return this;
-
-  }
-
-  public ResourceValidator isParameterAlias(final int index, final String name, final String alias) {
-    if (!(uriPathInfo instanceof UriResourceFunctionImpl)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    UriResourceFunctionImpl info = (UriResourceFunctionImpl) uriPathInfo;
-    List<UriParameter> keyPredicates = info.getParameters();
-    assertEquals(name, keyPredicates.get(index).getName());
-    assertEquals(alias, keyPredicates.get(index).getAlias());
-    return this;
-
-  }
-
-  public ResourceValidator isKind(final UriInfoKind kind) {
-    assertEquals(kind, uriInfo.getKind());
-    return this;
-  }
-
-  public ResourceValidator isPrimitiveProperty(final String name,
-      final FullQualifiedName type, final boolean isCollection) {
-    if (!(uriPathInfo instanceof UriResourcePrimitivePropertyImpl)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    UriResourcePrimitivePropertyImpl uriPathInfoProp = (UriResourcePrimitivePropertyImpl) uriPathInfo;
-
-    EdmElement property = uriPathInfoProp.getProperty();
-
-    assertEquals(name, property.getName());
-    assertEquals(type, new FullQualifiedName(property.getType().getNamespace(), property.getType().getName()));
-    assertEquals(isCollection, property.isCollection());
-    return this;
-  }
-
-  public ResourceValidator
-      isComplexProperty(final String name, final FullQualifiedName type, final boolean isCollection) {
-    if (!(uriPathInfo instanceof UriResourceComplexPropertyImpl)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    UriResourceComplexPropertyImpl uriPathInfoProp = (UriResourceComplexPropertyImpl) uriPathInfo;
-
-    EdmElement property = uriPathInfoProp.getProperty();
-
-    assertEquals(name, property.getName());
-    assertEquals(type, new FullQualifiedName(property.getType().getNamespace(), property.getType().getName()));
-    assertEquals(isCollection, property.isCollection());
-    return this;
-  }
-
-  public ResourceValidator isNavProperty(final String name, final FullQualifiedName type, final boolean isCollection) {
-    if (!(uriPathInfo instanceof UriResourceNavigationPropertyImpl)) {
-      fail("invalid resource kind: " + uriPathInfo.getKind().toString());
-    }
-
-    UriResourceNavigationPropertyImpl uriPathInfoProp = (UriResourceNavigationPropertyImpl) uriPathInfo;
-
-    EdmElement property = uriPathInfoProp.getProperty();
-
-    assertEquals(name, property.getName());
-    assertEquals(type, new FullQualifiedName(property.getType().getNamespace(), property.getType().getName()));
-    assertEquals(isCollection, uriPathInfoProp.isCollection());
-    return this;
-  }
-
-  public ResourceValidator isUriPathInfoKind(final UriResourceKind infoType) {
-    assertNotNull(uriPathInfo);
-    assertEquals(infoType, uriPathInfo.getKind());
-    return this;
-  }
-
-  public ResourceValidator isAction(final String name) {
-    assertEquals(UriResourceKind.action, uriPathInfo.getKind());
-    assertEquals(name, ((UriResourceActionImpl) uriPathInfo).getAction().getName());
-    return this;
-  }
-
-  public ResourceValidator isFunction(final String name) {
-    assertEquals(UriResourceKind.function, uriPathInfo.getKind());
-    assertEquals(name, ((UriResourceFunctionImpl) uriPathInfo).getFunction().getName());
-    return this;
-  }
-
-  public ResourceValidator isFunctionImport(final String name) {
-    assertEquals(UriResourceKind.function, uriPathInfo.getKind());
-    assertEquals(name, ((UriResourceFunctionImpl) uriPathInfo).getFunctionImport().getName());
-    return this;
-  }
-
-  public ResourceValidator isEntitySet(final String name) {
-    assertEquals(UriResourceKind.entitySet, uriPathInfo.getKind());
-    assertEquals(name, ((UriResourceEntitySetImpl) uriPathInfo).getEntitySet().getName());
-    return this;
-  }
-
-  public ResourceValidator isComplex(final String name) {
-    assertEquals(UriResourceKind.complexProperty, uriPathInfo.getKind());
-    assertEquals(name, ((UriResourceComplexPropertyImpl) uriPathInfo).getProperty().getName());
-    return this;
-  }
-
-  public ResourceValidator isSingleton(final String name) {
-    assertEquals(UriResourceKind.singleton, uriPathInfo.getKind());
-    assertEquals(name, ((UriResourceSingletonImpl) uriPathInfo).getSingleton().getName());
-    return this;
-  }
-
-  public ResourceValidator isValue() {
-    assertEquals(UriResourceKind.value, uriPathInfo.getKind());
-    return this;
-  }
-
-  public ResourceValidator isCount() {
-    assertEquals(UriResourceKind.count, uriPathInfo.getKind());
-    return this;
-  }
-
-  public ResourceValidator isRef() {
-    assertEquals(UriResourceKind.ref, uriPathInfo.getKind());
-    return this;
-  }
-
-  public ResourceValidator isActionImport(final String actionName) {
-    assertEquals(UriResourceKind.action, uriPathInfo.getKind());
-    assertEquals(actionName, ((UriResourceActionImpl) uriPathInfo).getActionImport().getName());
-    return this;
-  }
-
-  public ResourceValidator isIt() {
-    assertEquals(UriResourceKind.it, uriPathInfo.getKind());
-    return this;
-  }
-
-  public ResourceValidator isTopText(final String topText) {
-    assertEquals(topText, uriInfo.getTopOption().getText());
-    return this;
-  }
-
-  public ResourceValidator isFormatText(final String formatText) {
-    assertEquals(formatText, uriInfo.getFormatOption().getText());
-    return this;
-  }
-
-  public ResourceValidator isInlineCountText(final String inlineCountText) {
-    assertEquals(inlineCountText, uriInfo.getInlineCountOption().getText());
-    return this;
-  }
-
-  public ResourceValidator isSkipText(final String skipText) {
-    assertEquals(skipText, uriInfo.getSkipOption().getText());
-    return this;
-  }
-
-  public ResourceValidator isSkipTokenText(final String skipTokenText) {
-    assertEquals(skipTokenText, uriInfo.getSkipTokenOption().getText());
-    return this;
-  }
-
-  public ResourceValidator isSelectItemStar(final int index) {
-    SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption();
-
-    SelectItem item = select.getSelectItems().get(index);
-    assertEquals(true, item.isStar());
-    return this;
-  }
-
-  public ResourceValidator isSelectItemAllOp(final int index, final FullQualifiedName fqn) {
-    SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption();
-
-    SelectItem item = select.getSelectItems().get(index);
-    assertEquals(fqn.toString(), item.getAllOperationsInSchemaNameSpace().toString());
-    return this;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TestErrorLogger.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TestErrorLogger.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TestErrorLogger.java
deleted file mode 100644
index 46a86ee..0000000
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TestErrorLogger.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.server.core.testutil;
-
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.List;
-
-import org.antlr.v4.runtime.ANTLRErrorListener;
-import org.antlr.v4.runtime.Parser;
-import org.antlr.v4.runtime.RecognitionException;
-import org.antlr.v4.runtime.Recognizer;
-import org.antlr.v4.runtime.atn.ATNConfigSet;
-import org.antlr.v4.runtime.dfa.DFA;
-import org.apache.olingo.odata4.server.core.uri.antlr.UriLexer;
-
-class TestErrorLogger implements ANTLRErrorListener {
-
-  private String prefix;
-  private int logLevel = 0;
-
-  public TestErrorLogger(final String prefix, final int logLevel) {
-    this.prefix = prefix;
-    this.logLevel = logLevel;
-  }
-
-  @Override
-  public void syntaxError(final Recognizer<?, ?> recognizer, final Object offendingSymbol, final int line,
-      final int charPositionInLine,
-      final String msg, final RecognitionException e) {
-
-    if (logLevel > 0) {
-      System.out.println("\n" + prefix + " -- SyntaxError");
-      trace(recognizer, offendingSymbol, line, charPositionInLine, msg, e);
-    }
-
-  }
-
-  @Override
-  public void reportAmbiguity(final Parser recognizer, final DFA dfa, final int startIndex, final int stopIndex,
-      final boolean exact,
-      final BitSet ambigAlts, final ATNConfigSet configs) {
-
-  }
-
-  @Override
-  public void reportAttemptingFullContext(final Parser recognizer, final DFA dfa, final int startIndex,
-      final int stopIndex,
-      final BitSet conflictingAlts, final ATNConfigSet configs) {
-
-  }
-
-  @Override
-  public void reportContextSensitivity(final Parser recognizer, final DFA dfa, final int startIndex,
-      final int stopIndex, final int prediction,
-      final ATNConfigSet configs) {
-
-  }
-
-  private void printStack(final Recognizer<?, ?> recognizer) {
-    List<String> stack = ((Parser) recognizer).getRuleInvocationStack();
-    Collections.reverse(stack);
-    System.out.println(" rule stack: " + stack);
-  }
-
-  public void trace(final Recognizer<?, ?> recognizer, final Object offendingSymbol,
-      final int line, final int charPositionInLine, final String msg, final RecognitionException e) {
-
-    System.out.println("Error message: " + msg);
-
-    printStack(recognizer);
-
-    System.out.println(" line/char :" + line + " / " + charPositionInLine);
-    System.out.println(" sym       :" + offendingSymbol);
-    if (e != null && e.getOffendingToken() != null) {
-
-      String lexerTokenName = "";
-      try {
-        lexerTokenName = UriLexer.tokenNames[e.getOffendingToken().getType()];
-      } catch (ArrayIndexOutOfBoundsException es) {
-        lexerTokenName = "token error";
-      }
-
-      System.out.println(" tokenname:" + lexerTokenName);
-    }
-
-  }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TokenValidator.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TokenValidator.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TokenValidator.java
deleted file mode 100644
index 5961421..0000000
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/TokenValidator.java
+++ /dev/null
@@ -1,194 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.server.core.testutil;
-
-import static org.junit.Assert.assertEquals;
-
-import java.util.List;
-
-import org.antlr.v4.runtime.ANTLRInputStream;
-import org.antlr.v4.runtime.Token;
-import org.apache.olingo.odata4.server.core.uri.antlr.UriLexer;
-
-//TODO extend to test also exception which can occure while paring
-public class TokenValidator {
-
-  private String input = null;
-
-  private List<? extends Token> tokens = null;
-  private Token curToken = null;
-  private Exception curException = null;
-
-  private int startMode;
-  private int logLevel = 0;
-
-  // --- Setup ---
-
-  public TokenValidator log(final int logLevel) {
-    this.logLevel = logLevel;
-    return this;
-  }
-
-  // --- Execution ---
-
-  public TokenValidator run(final String uri) {
-    input = uri;
-
-    tokens = parseInput(uri);
-    if (logLevel > 0) {
-      showTokens();
-    }
-
-    first();
-    exFirst();
-    logLevel = 0;
-
-    return this;
-  }
-
-  // --- Navigation ---
-
-  // navigate within the tokenlist
-  public TokenValidator first() {
-    try {
-      curToken = tokens.get(0);
-    } catch (IndexOutOfBoundsException ex) {
-      curToken = null;
-    }
-    return this;
-  }
-
-  public TokenValidator last() {
-    curToken = tokens.get(tokens.size() - 1);
-    return this;
-  }
-
-  public TokenValidator at(final int index) {
-    try {
-      curToken = tokens.get(index);
-    } catch (IndexOutOfBoundsException ex) {
-      curToken = null;
-    }
-    return this;
-  }
-
-  public TokenValidator exLast() {
-    // curException = exceptions.get(exceptions.size() - 1);
-    return this;
-  }
-
-  // navigate within the exception list
-  public TokenValidator exFirst() {
-    try {
-      // curException = exceptions.get(0);
-    } catch (IndexOutOfBoundsException ex) {
-      curException = null;
-    }
-    return this;
-
-  }
-
-  public TokenValidator exAt(final int index) {
-    try {
-      // curException = exceptions.get(index);
-    } catch (IndexOutOfBoundsException ex) {
-      curException = null;
-    }
-    return this;
-  }
-
-  // --- Validation ---
-
-  public TokenValidator isText(final String expected) {
-    assertEquals(expected, curToken.getText());
-    return this;
-  }
-
-  public TokenValidator isAllText(final String expected) {
-    String actual = "";
-
-    for (Token curToken : tokens) {
-      actual += curToken.getText();
-    }
-    assertEquals(expected, actual);
-    return this;
-  }
-
-  public TokenValidator isAllInput() {
-    String actual = "";
-
-    for (Token curToken : tokens) {
-      actual += curToken.getText();
-    }
-    assertEquals(input, actual);
-    return this;
-  }
-
-  public TokenValidator isInput() {
-    assertEquals(input, curToken.getText());
-    return this;
-  }
-
-  public TokenValidator isType(final int expected) {
-    assertEquals(UriLexer.tokenNames[expected], UriLexer.tokenNames[curToken.getType()]);
-    return this;
-  }
-
-  public TokenValidator isExType(final Class<?> exClass) {
-    assertEquals(exClass, curException.getClass());
-    return this;
-  }
-
-  public void globalMode(final int mode) {
-    startMode = mode;
-  }
-
-  // --- Helper ---
-
-  private List<? extends Token> parseInput(final String input) {
-    ANTLRInputStream inputStream = new ANTLRInputStream(input);
-
-    UriLexer lexer = new UriLexerWithTrace(inputStream, logLevel, startMode);
-    // lexer.addErrorListener(new ErrorCollector(this));
-    return lexer.getAllTokens();
-  }
-
-  public TokenValidator showTokens() {
-    boolean first = true;
-    System.out.println("input: " + input);
-    String nL = "\n";
-    String out = "[" + nL;
-    for (Token token : tokens) {
-      if (!first) {
-        out += ",";
-        first = false;
-      }
-      int index = token.getType();
-      if (index != -1) {
-        out += "\"" + token.getText() + "\"" + "     " + UriLexer.tokenNames[index] + nL;
-      } else {
-        out += "\"" + token.getText() + "\"" + "     " + index + nL;
-      }
-    }
-    out += ']';
-    System.out.println("tokens: " + out);
-    return this;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriLexerWithTrace.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriLexerWithTrace.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriLexerWithTrace.java
deleted file mode 100644
index 91622ca..0000000
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriLexerWithTrace.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.server.core.testutil;
-
-import org.antlr.v4.runtime.ANTLRInputStream;
-import org.antlr.v4.runtime.Token;
-import org.apache.olingo.odata4.server.core.uri.antlr.UriLexer;
-
-public class UriLexerWithTrace extends UriLexer {
-  int logLevel = 0;
-
-  public UriLexerWithTrace(final ANTLRInputStream antlrInputStream, final int logLevel) {
-    super(antlrInputStream);
-    this.logLevel = logLevel;
-  }
-
-  public UriLexerWithTrace(final ANTLRInputStream antlrInputStream, final int logLevel, final int mode) {
-    super(antlrInputStream);
-    super.mode(mode);
-    this.logLevel = logLevel;
-  }
-
-  @Override
-  public void emit(final Token token) {
-    if (logLevel > 1) {
-      String out = String.format("%1$-" + 20 + "s", token.getText());
-
-      int tokenType = token.getType();
-      if (tokenType == -1) {
-        out += "-1/EOF";
-      } else {
-        out += UriLexer.tokenNames[tokenType];
-      }
-      System.out.println("Lexer.emit(...):" + out);
-    }
-
-    super.emit(token);
-  }
-
-  @Override
-  public void pushMode(final int m) {
-
-    String out = UriLexer.modeNames[_mode] + "-->";
-
-    super.pushMode(m);
-
-    out += UriLexer.modeNames[_mode];
-
-    if (logLevel > 1) {
-      System.out.println(out + "            ");
-    }
-  }
-
-  @Override
-  public int popMode() {
-
-    String out = UriLexer.modeNames[_mode] + "-->";
-
-    int m = super.popMode();
-
-    out += UriLexer.modeNames[_mode];
-
-    if (logLevel > 1) {
-      System.out.println(out + "            ");
-    }
-
-    return m;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriValidator.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriValidator.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriValidator.java
deleted file mode 100644
index 23294a8..0000000
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/UriValidator.java
+++ /dev/null
@@ -1,245 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.server.core.testutil;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.List;
-
-import org.apache.olingo.odata4.commons.api.edm.Edm;
-import org.apache.olingo.odata4.commons.api.edm.EdmEntityType;
-import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
-import org.apache.olingo.odata4.server.api.uri.UriInfoKind;
-import org.apache.olingo.odata4.server.api.uri.queryoption.CustomQueryOption;
-import org.apache.olingo.odata4.server.api.uri.queryoption.SelectItem;
-import org.apache.olingo.odata4.server.core.uri.UriParserException;
-import org.apache.olingo.odata4.server.core.uri.UriParserSemanticException;
-import org.apache.olingo.odata4.server.core.uri.UriParserSyntaxException;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl;
-import org.apache.olingo.odata4.server.core.uri.parser.Parser;
-import org.apache.olingo.odata4.server.core.uri.queryoption.CustomQueryOptionImpl;
-import org.apache.olingo.odata4.server.core.uri.queryoption.ExpandOptionImpl;
-import org.apache.olingo.odata4.server.core.uri.queryoption.FilterOptionImpl;
-import org.apache.olingo.odata4.server.core.uri.queryoption.SelectOptionImpl;
-
-public class UriValidator implements Validator {
-  private Edm edm;
-
-  private UriInfoImpl uriInfo;
-  private Exception exception;
-
-  // Setup
-  public UriValidator setEdm(final Edm edm) {
-    this.edm = edm;
-    return this;
-  }
-
-  // Execution
-  public UriValidator run(final String uri) {
-    Parser parser = new Parser();
-    uriInfo = null;
-    try {
-      // uriInfoTmp = new UriParserImpl(edm).ParseUri(uri);
-      uriInfo = (UriInfoImpl) parser.parseUri(uri, edm);
-    } catch (UriParserException e) {
-      fail("Exception occured while parsing the URI: " + uri + "\n"
-          + " Exception: " + e.getMessage());
-    }
-
-    return this;
-  }
-
-  public UriValidator runEx(final String uri) {
-    Parser parser = new Parser();
-    uriInfo = null;
-    try {
-      // uriInfoTmp = new UriParserImpl(edm).ParseUri(uri);
-      uriInfo = (UriInfoImpl) parser.parseUri(uri, edm);
-      fail("Exception expected");
-    } catch (UriParserException e) {
-      exception = e;
-    }
-
-    return this;
-  }
-
-  public UriValidator log(final String uri) {
-    ParserWithLogging parserTest = new ParserWithLogging();
-    parserTest.setLogLevel(1);
-    uriInfo = null;
-    try {
-      // uriInfoTmp = new UriParserImpl(edm).ParseUri(uri);
-      uriInfo = (UriInfoImpl) parserTest.parseUri(uri, edm);
-    } catch (UriParserException e) {
-      fail("Exception occured while parsing the URI: " + uri + "\n"
-          + " Exception: " + e.getMessage());
-    }
-
-    return this;
-  }
-
-  // Navigation
-  public ResourceValidator goPath() {
-    if (uriInfo.getKind() != UriInfoKind.resource) {
-      fail("invalid resource kind: " + uriInfo.getKind().toString());
-    }
-
-    return new ResourceValidator()
-        .setUpValidator(this)
-        .setEdm(edm)
-        .setUriInfoImplPath(uriInfo);
-  }
-
-  public FilterValidator goFilter() {
-    FilterOptionImpl filter = (FilterOptionImpl) uriInfo.getFilterOption();
-    if (filter == null) {
-      fail("no filter found");
-    }
-    return new FilterValidator().setUriValidator(this).setFilter(filter);
-
-  }
-
-  public ExpandValidator goExpand() {
-    ExpandOptionImpl expand = (ExpandOptionImpl) uriInfo.getExpandOption();
-    if (expand == null) {
-      fail("invalid resource kind: " + uriInfo.getKind().toString());
-    }
-
-    return new ExpandValidator().setUpValidator(this).setExpand(expand);
-  }
-
-  public ResourceValidator goSelectItemPath(final int index) {
-    SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption();
-
-    SelectItem item = select.getSelectItems().get(index);
-    UriInfoImpl uriInfo1 = (UriInfoImpl) item.getResourceInfo();
-
-    return new ResourceValidator()
-        .setUpValidator(this)
-        .setEdm(edm)
-        .setUriInfoImplPath(uriInfo1);
-
-  }
-
-  // Validation
-  public UriValidator isKind(final UriInfoKind kind) {
-    assertEquals(kind, uriInfo.getKind());
-    return this;
-  }
-
-  public UriValidator isCustomParameter(final int index, final String name, final String value) {
-    if (uriInfo == null) {
-      fail("hasQueryParameter: uriInfo == null");
-    }
-
-    List<CustomQueryOption> list = uriInfo.getCustomQueryOptions();
-    if (list.size() <= index) {
-      fail("not enought queryParameters");
-    }
-
-    CustomQueryOptionImpl option = (CustomQueryOptionImpl) list.get(index);
-    assertEquals(name, option.getName());
-    assertEquals(value, option.getText());
-    return this;
-  }
-
-  public void isCrossJoinEntityList(final List<String> entitySets) {
-    if (uriInfo.getKind() != UriInfoKind.crossjoin) {
-      fail("invalid resource kind: " + uriInfo.getKind().toString());
-    }
-
-    int i = 0;
-    for (String entitySet : entitySets) {
-      assertEquals(entitySet, uriInfo.getEntitySetNames().get(i));
-      i++;
-    }
-
-  }
-
-  public UriValidator isExSyntax(final long errorID) {
-    assertEquals(UriParserSyntaxException.class, exception.getClass());
-    return this;
-  }
-
-  public UriValidator isExSemantic(final long errorID) {
-    assertEquals(UriParserSemanticException.class, exception.getClass());
-    return this;
-  }
-
-  public UriValidator isIdText(final String text) {
-    assertEquals(text, uriInfo.getIdOption().getText());
-    return this;
-  }
-
-  public UriValidator isExpandText(final String text) {
-    assertEquals(text, uriInfo.getExpandOption().getText());
-    return this;
-  }
-
-  public UriValidator isSelectText(final String text) {
-    assertEquals(text, uriInfo.getSelectOption().getText());
-    return this;
-  }
-
-  public UriValidator isFormatText(final String text) {
-    assertEquals(text, uriInfo.getFormatOption().getText());
-    return this;
-  }
-
-  public UriValidator isFragmentText(final String text) {
-    if (uriInfo.getKind() != UriInfoKind.metadata) {
-      fail("invalid resource kind: " + uriInfo.getKind().toString());
-    }
-
-    assertEquals(text, uriInfo.getFragment());
-
-    return this;
-  }
-
-  public UriValidator isEntityType(final FullQualifiedName fullName) {
-    if (uriInfo.getKind() != UriInfoKind.entityId) {
-      fail("invalid resource kind: " + uriInfo.getKind().toString());
-    }
-
-    assertEquals(fullName.toString(), fullName(uriInfo.getEntityTypeCast()));
-    return this;
-  }
-
-  private String fullName(final EdmEntityType type) {
-    return type.getNamespace() + "." + type.getName();
-  }
-
-  public UriValidator isSelectItemStar(final int index) {
-    SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption();
-
-    SelectItem item = select.getSelectItems().get(index);
-    assertEquals(true, item.isStar());
-    return this;
-  }
-
-  public UriValidator isSelectItemAllOp(final int index, final FullQualifiedName fqn) {
-    SelectOptionImpl select = (SelectOptionImpl) uriInfo.getSelectOption();
-
-    SelectItem item = select.getSelectItems().get(index);
-    assertEquals(fqn.toString(), item.getAllOperationsInSchemaNameSpace().toString());
-    return this;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/Validator.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/Validator.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/Validator.java
deleted file mode 100644
index 6febab2..0000000
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/testutil/Validator.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*******************************************************************************
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- * 
- * http://www.apache.org/licenses/LICENSE-2.0
- * 
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- ******************************************************************************/
-package org.apache.olingo.odata4.server.core.testutil;
-
-public interface Validator {
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/RawUriTest.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/RawUriTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/RawUriTest.java
index c7ec93b..4333a06 100644
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/RawUriTest.java
+++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/RawUriTest.java
@@ -26,6 +26,7 @@ import java.util.List;
 
 import org.apache.olingo.odata4.server.core.uri.parser.RawUri;
 import org.apache.olingo.odata4.server.core.uri.parser.UriDecoder;
+import org.apache.olingo.odata4.server.core.uri.parser.UriParserSyntaxException;
 import org.junit.Test;
 
 public class RawUriTest {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriInfoImplTest.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriInfoImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriInfoImplTest.java
index 222d067..b188355 100644
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriInfoImplTest.java
+++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriInfoImplTest.java
@@ -38,9 +38,6 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.CustomQueryOption;
 import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceActionImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceEntitySetImpl;
 import org.apache.olingo.odata4.server.core.uri.queryoption.CountOptionImpl;
 import org.apache.olingo.odata4.server.core.uri.queryoption.CustomQueryOptionImpl;
 import org.apache.olingo.odata4.server.core.uri.queryoption.ExpandOptionImpl;

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriParameterImplTest.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriParameterImplTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriParameterImplTest.java
index 9a5f65b..1462ab9 100644
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriParameterImplTest.java
+++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/UriParameterImplTest.java
@@ -42,25 +42,6 @@ import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.odata4.server.core.edm.provider.EdmSingletonImpl;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriParameterImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceActionImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceComplexPropertyImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceCountImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceEntitySetImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceFunctionImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceItImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceLambdaAllImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceLambdaAnyImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceLambdaVarImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceNavigationPropertyImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourcePrimitivePropertyImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceRefImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceRootImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceSingletonImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceStartingTypeFilterImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceTypedImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceValueImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceWithKeysImpl;
 import org.apache.olingo.odata4.server.core.uri.queryoption.expression.ExpressionImpl;
 import org.apache.olingo.odata4.server.core.uri.queryoption.expression.LiteralImpl;
 import org.junit.Test;
@@ -495,6 +476,7 @@ public class UriParameterImplTest {
     assertEquals(true, impl.isCollection());
   }
 
+  /*
   @Test
   public void testUriResourceStartingTypeFilterImpl() {
     UriResourceStartingTypeFilterImpl impl = new UriResourceStartingTypeFilterImpl();
@@ -516,5 +498,5 @@ public class UriParameterImplTest {
     impl.setKeyPredicates(keyPredicates);
     assertEquals(false, impl.isCollection());
 
-  }
+  }*/
 }

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestFullResourcePath.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestFullResourcePath.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestFullResourcePath.java
index 7c41bff..ecbcaaf 100644
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestFullResourcePath.java
+++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestFullResourcePath.java
@@ -18,12 +18,17 @@
  ******************************************************************************/
 package org.apache.olingo.odata4.server.core.uri.antlr;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import java.io.UnsupportedEncodingException;
 import java.net.URLEncoder;
 import java.util.Arrays;
 
 import org.apache.olingo.odata4.commons.api.ODataApplicationException;
 import org.apache.olingo.odata4.commons.api.edm.Edm;
+import org.apache.olingo.odata4.commons.api.edm.EdmType;
+import org.apache.olingo.odata4.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.odata4.server.api.uri.UriInfoKind;
 import org.apache.olingo.odata4.server.api.uri.UriResourceKind;
 import org.apache.olingo.odata4.server.api.uri.queryoption.expression.BinaryOperatorKind;
@@ -32,10 +37,11 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.expression.MethodCall
 import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider;
-import org.apache.olingo.odata4.server.core.testutil.FilterValidator;
-import org.apache.olingo.odata4.server.core.testutil.ResourceValidator;
-import org.apache.olingo.odata4.server.core.testutil.UriValidator;
-import org.apache.olingo.odata4.server.core.uri.UriParserException;
+import org.apache.olingo.odata4.server.core.uri.parser.UriParserException;
+import org.apache.olingo.odata4.server.core.uri.queryoption.expression.MemberImpl;
+import org.apache.olingo.odata4.server.core.uri.testutil.FilterValidator;
+import org.apache.olingo.odata4.server.core.uri.testutil.ResourceValidator;
+import org.apache.olingo.odata4.server.core.uri.testutil.UriValidator;
 import org.junit.Test;
 
 public class TestFullResourcePath {
@@ -53,7 +59,7 @@ public class TestFullResourcePath {
 
   @Test
   public void test() throws UriParserException {
-    // testUri.log("ESAllPrim?$orderby=PropertyDouble eq 3.5E+38");
+
   }
 
   @Test
@@ -2344,10 +2350,11 @@ public class TestFullResourcePath {
         + "$expand=com.sap.odata.test1.ETBaseTwoKeyNav/NavPropertyETKeyNavMany")
         .isKind(UriInfoKind.resource).goPath().first()
         .goExpand().first()
+        .isExpandStartType(EdmTechProvider.nameETBaseTwoKeyNav)
         .goPath().first()
-        .isType(EdmTechProvider.nameETTwoKeyNav)
-        .isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav)
-        .n()
+        // .isType(EdmTechProvider.nameETTwoKeyNav)
+        // .isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav)
+        // .n()
         .isNavProperty("NavPropertyETKeyNavMany", EdmTechProvider.nameETKeyNav, true);
 
     testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='Hugo')?"
@@ -2356,10 +2363,11 @@ public class TestFullResourcePath {
         .isKeyPredicate(0, "PropertyInt16", "1")
         .isKeyPredicate(1, "PropertyString", "'Hugo'")
         .goExpand().first()
+        .isExpandStartType(EdmTechProvider.nameETBaseTwoKeyNav)
         .goPath().first()
-        .isType(EdmTechProvider.nameETTwoKeyNav)
-        .isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav)
-        .n()
+        //.isType(EdmTechProvider.nameETTwoKeyNav)
+        //.isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav)
+        //.n()
         .isNavProperty("NavPropertyETKeyNavMany", EdmTechProvider.nameETKeyNav, true);
 
     testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')?"
@@ -2368,10 +2376,11 @@ public class TestFullResourcePath {
         .isKeyPredicate(0, "PropertyInt16", "1")
         .isKeyPredicate(1, "PropertyString", "'2'")
         .goExpand().first()
+        .isExpandStartType(EdmTechProvider.nameETBaseTwoKeyNav)
         .goPath().first()
-        .isType(EdmTechProvider.nameETTwoKeyNav)
-        .isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav)
-        .n()
+        //.isType(EdmTechProvider.nameETTwoKeyNav)
+        //.isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav)
+        //.n()
         .isNavProperty("NavPropertyETTwoKeyNavMany", EdmTechProvider.nameETTwoKeyNav, true);
 
     testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')?$expand=com.sap.odata.test1.ETBaseTwoKeyNav"
@@ -2380,20 +2389,22 @@ public class TestFullResourcePath {
         .isKeyPredicate(0, "PropertyInt16", "1")
         .isKeyPredicate(1, "PropertyString", "'2'")
         .goExpand().first()
+        .isExpandStartType(EdmTechProvider.nameETBaseTwoKeyNav)
         .goPath().first()
-        .isType(EdmTechProvider.nameETTwoKeyNav)
-        .isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav)
-        .n()
+        //.isType(EdmTechProvider.nameETTwoKeyNav)
+        //.isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav)
+        //.n()
         .isNavProperty("NavPropertyETTwoKeyNavMany", EdmTechProvider.nameETTwoKeyNav, true)
         .isTypeFilterOnCollection(EdmTechProvider.nameETTwoBaseTwoKeyNav);
 
     testUri.run("ESTwoKeyNav?$expand=com.sap.odata.test1.ETBaseTwoKeyNav/PropertyComplexNav/NavPropertyETTwoKeyNavOne")
         .isKind(UriInfoKind.resource).goPath().first()
         .goExpand().first()
+        .isExpandStartType(EdmTechProvider.nameETBaseTwoKeyNav)
         .goPath().first()
-        .isType(EdmTechProvider.nameETTwoKeyNav)
-        .isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav)
-        .n()
+        //.isType(EdmTechProvider.nameETTwoKeyNav)
+        //.isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav)
+        //.n()
         .isComplex("PropertyComplexNav")
         .isType(EdmTechProvider.nameCTBasePrimCompNav)
         .n()
@@ -2403,10 +2414,11 @@ public class TestFullResourcePath {
         + "/com.sap.odata.test1.CTTwoBasePrimCompNav/NavPropertyETTwoKeyNavOne")
         .isKind(UriInfoKind.resource).goPath().first()
         .goExpand().first()
+        .isExpandStartType(EdmTechProvider.nameETBaseTwoKeyNav)
         .goPath().first()
-        .isType(EdmTechProvider.nameETTwoKeyNav)
-        .isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav)
-        .n()
+        //.isType(EdmTechProvider.nameETTwoKeyNav)
+        //.isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav)
+        //.n()
         .isComplex("PropertyComplexNav")
         .isType(EdmTechProvider.nameCTBasePrimCompNav)
         .n()
@@ -2434,11 +2446,12 @@ public class TestFullResourcePath {
         .isKeyPredicate(0, "PropertyInt16", "1")
         .isKeyPredicate(1, "PropertyString", "'2'")
         .goExpand().first()
+        .isExpandStartType(EdmTechProvider.nameETBaseTwoKeyNav)
         .goPath().first()
-        .isUriPathInfoKind(UriResourceKind.startingTypeFilter)
-        .isType(EdmTechProvider.nameETTwoKeyNav)
-        .isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav)
-        .n().isNavProperty("NavPropertyETTwoKeyNavMany", EdmTechProvider.nameETTwoKeyNav, true)
+        //.isUriPathInfoKind(UriResourceKind.startingTypeFilter)
+        //.isType(EdmTechProvider.nameETTwoKeyNav)
+        //.isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav)
+        //.n().isNavProperty("NavPropertyETTwoKeyNavMany", EdmTechProvider.nameETTwoKeyNav, true)
         .isType(EdmTechProvider.nameETTwoKeyNav)
         .isTypeFilterOnCollection(EdmTechProvider.nameETTwoBaseTwoKeyNav)
         .goUpExpandValidator()
@@ -2462,6 +2475,17 @@ public class TestFullResourcePath {
         .goPath().first()
         .isNavProperty("NavPropertyETKeyNavOne", EdmTechProvider.nameETKeyNav, false)
         .isType(EdmTechProvider.nameETKeyNav);
+    
+    testUri.run("ESTwoKeyNav(PropertyInt16=1,PropertyString='2')?$select=com.sap.odata.test1.ETBaseTwoKeyNav"
+        + "/PropertyInt16")
+        .isKind(UriInfoKind.resource).goPath()
+        .first()
+        .isKeyPredicate(0, "PropertyInt16", "1")
+        .isKeyPredicate(1, "PropertyString", "'2'")
+        .isSelectStartType(0, EdmTechProvider.nameETBaseTwoKeyNav)
+        .goSelectItem(0)
+        .first()
+        .isPrimitiveProperty("PropertyInt16", EdmTechProvider.nameInt16, false);        
 
     testUri.run("ESKeyNav?$expand=NavPropertyETKeyNavOne($select=PropertyInt16)")
         .isKind(UriInfoKind.resource)
@@ -2835,25 +2859,27 @@ public class TestFullResourcePath {
         .root().right();
 
     testFilter.runOnETTwoKeyNav("com.sap.odata.test1.ETBaseTwoKeyNav/PropertyDate eq 2013-11-12")
-        .is("<<com.sap.odata.test1.ETTwoKeyNav/com.sap.odata.test1.ETBaseTwoKeyNav/PropertyDate> eq <2013-11-12>>")
+        .is("<<PropertyDate> eq <2013-11-12>>")
         .root().left()
         .isType(EdmTechProvider.nameDate)
-        .isMember().goPath()
-        .first().isUriPathInfoKind(UriResourceKind.startingTypeFilter)
-        .isType(EdmTechProvider.nameETTwoKeyNav).isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav)
-        .n().isPrimitiveProperty("PropertyDate", EdmTechProvider.nameDate, false)
+        .isMember().isMemberStartType(EdmTechProvider.nameETBaseTwoKeyNav).goPath()
+        // .first().isUriPathInfoKind(UriResourceKind.startingTypeFilter)
+        // .isType(EdmTechProvider.nameETTwoKeyNav).isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav)
+        // .n().isPrimitiveProperty("PropertyDate", EdmTechProvider.nameDate, false)
+        .first().isPrimitiveProperty("PropertyDate", EdmTechProvider.nameDate, false)
         .goUpFilterValidator()
         .root().right()
         .isLiteral("2013-11-12");
 
     testFilter.runOnCTTwoPrim("com.sap.odata.test1.CTBase/AdditionalPropString eq 'SomeString'")
-        .is("<<com.sap.odata.test1.CTTwoPrim/com.sap.odata.test1.CTBase/AdditionalPropString> eq <'SomeString'>>")
+        .is("<<AdditionalPropString> eq <'SomeString'>>")
         .root().left()
         .isType(EdmTechProvider.nameString)
-        .isMember().goPath()
-        .first().isUriPathInfoKind(UriResourceKind.startingTypeFilter)
-        .isType(EdmTechProvider.nameCTTwoPrim).isTypeFilterOnEntry(EdmTechProvider.nameCTBase)
-        .n().isPrimitiveProperty("AdditionalPropString", EdmTechProvider.nameString, false)
+        .isMember().isMemberStartType(EdmTechProvider.nameCTBase).goPath()
+        // .first().isUriPathInfoKind(UriResourceKind.startingTypeFilter)
+        // .isType(EdmTechProvider.nameCTTwoPrim).isTypeFilterOnEntry(EdmTechProvider.nameCTBase)
+        // .n().isPrimitiveProperty("AdditionalPropString", EdmTechProvider.nameString, false)
+        .first().isPrimitiveProperty("AdditionalPropString", EdmTechProvider.nameString, false)
         .goUpFilterValidator()
         .root().right()
         .isLiteral("'SomeString'");
@@ -2874,7 +2900,7 @@ public class TestFullResourcePath {
         .root().right()
         .isLiteral("'SomeString'");
 
-    // testFilter.runOnETTwoKeyNavEx("invalid").isExSemantic(0);
+    testFilter.runOnETTwoKeyNavEx("invalid").isExSemantic(0);
     testFilter.runOnETTwoKeyNavEx("PropertyComplex/invalid").isExSemantic(0);
     testFilter.runOnETTwoKeyNavEx("concat('a','b')/invalid").isExSyntax(0);
     testFilter.runOnETTwoKeyNavEx("PropertyComplex/concat('a','b')").isExSyntax(0);
@@ -3269,7 +3295,7 @@ public class TestFullResourcePath {
         .root().right()
         .isType(EdmTechProvider.nameDecimal);
 
-    // DODO not synced
+    //
     testFilter.runOnETAllPrim("PropertyDecimal ge PropertyDecimal")
         .is("<<PropertyDecimal> ge <PropertyDecimal>>")
         .isBinary(BinaryOperatorKind.GE)
@@ -3291,6 +3317,13 @@ public class TestFullResourcePath {
         .isType(EdmTechProvider.nameDecimal)
         .root().right()
         .isType(EdmTechProvider.nameDecimal);
+
+    testFilter.runOnETAllPrim("PropertyDecimal sub NaN")
+        .right().isLiteral("NaN").isType(EdmTechProvider.nameDecimal);
+    testFilter.runOnETAllPrim("PropertyDecimal sub -INF")
+        .right().isLiteral("-INF").isType(EdmTechProvider.nameDecimal);
+    testFilter.runOnETAllPrim("PropertyDecimal sub INF")
+        .right().isLiteral("INF").isType(EdmTechProvider.nameDecimal);
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestLexer.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestLexer.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestLexer.java
index 60ddae6..77aa204 100644
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestLexer.java
+++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestLexer.java
@@ -19,7 +19,7 @@
 package org.apache.olingo.odata4.server.core.uri.antlr;
 
 import org.antlr.v4.runtime.Lexer;
-import org.apache.olingo.odata4.server.core.testutil.TokenValidator;
+import org.apache.olingo.odata4.server.core.uri.testutil.TokenValidator;
 import org.junit.Test;
 
 public class TestLexer {

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestParser.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestParser.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestParser.java
index 09d932b..a856e89 100644
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestParser.java
+++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestParser.java
@@ -18,7 +18,7 @@
  ******************************************************************************/
 package org.apache.olingo.odata4.server.core.uri.antlr;
 
-import org.apache.olingo.odata4.server.core.testutil.ParserValidator;
+import org.apache.olingo.odata4.server.core.uri.testutil.ParserValidator;
 import org.junit.Test;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestUriParserImpl.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestUriParserImpl.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestUriParserImpl.java
index 66eed3f..77dc1ac 100644
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestUriParserImpl.java
+++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/antlr/TestUriParserImpl.java
@@ -30,10 +30,10 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.expression.MethodCall
 import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider;
-import org.apache.olingo.odata4.server.core.testutil.FilterValidator;
-import org.apache.olingo.odata4.server.core.testutil.ResourceValidator;
-import org.apache.olingo.odata4.server.core.testutil.UriValidator;
-import org.apache.olingo.odata4.server.core.uri.UriParserException;
+import org.apache.olingo.odata4.server.core.uri.parser.UriParserException;
+import org.apache.olingo.odata4.server.core.uri.testutil.FilterValidator;
+import org.apache.olingo.odata4.server.core.uri.testutil.ResourceValidator;
+import org.apache.olingo.odata4.server.core.uri.testutil.UriValidator;
 import org.junit.Test;
 
 public class TestUriParserImpl {
@@ -1005,40 +1005,44 @@ public class TestUriParserImpl {
     // on EntityType entry
     testUri.run("ESTwoKeyNav(ParameterInt16=1,PropertyString='ABC')?"
         + "$filter=com.sap.odata.test1.ETBaseTwoKeyNav/PropertyDate")
-        .goFilter().root().isMember().goPath()
-        .at(0)
-        .isUriPathInfoKind(UriResourceKind.startingTypeFilter)
-        .isType(EdmTechProvider.nameETTwoKeyNav, false)
-        .isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav)
-        .at(1).isType(EdmTechProvider.nameDate);
+        .goFilter().root().isMember()
+        .isMemberStartType(EdmTechProvider.nameETBaseTwoKeyNav).goPath()
+        // .at(0)
+        // .isUriPathInfoKind(UriResourceKind.startingTypeFilter)
+        // .isType(EdmTechProvider.nameETTwoKeyNav, false)
+        // .isTypeFilterOnEntry(EdmTechProvider.nameETBaseTwoKeyNav)
+        .at(0).isType(EdmTechProvider.nameDate);
 
     // on EntityType collection
     testUri.run("ESTwoKeyNav?$filter=com.sap.odata.test1.ETBaseTwoKeyNav/PropertyDate")
-        .goFilter().root().isMember().goPath()
-        .at(0)
-        .isUriPathInfoKind(UriResourceKind.startingTypeFilter)
-        .isType(EdmTechProvider.nameETTwoKeyNav, true)
-        .isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav)
-        .at(1).isType(EdmTechProvider.nameDate);
+        .goFilter().root().isMember()
+        .isMemberStartType(EdmTechProvider.nameETBaseTwoKeyNav).goPath()
+        // .at(0)
+        // .isUriPathInfoKind(UriResourceKind.startingTypeFilter)
+        // .isType(EdmTechProvider.nameETTwoKeyNav, true)
+        // .isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav)
+        .at(0).isType(EdmTechProvider.nameDate);
 
     testUri.run("FICRTCTTwoPrimParam(ParameterInt16=1,ParameterString='2')?"
         + "$filter=com.sap.odata.test1.CTBase/AdditionalPropString")
-        .goFilter().root().isMember().goPath()
-        .at(0)
-        .isUriPathInfoKind(UriResourceKind.startingTypeFilter)
-        .isType(EdmTechProvider.nameCTTwoPrim, false)
-        .isTypeFilterOnEntry(EdmTechProvider.nameCTBase)
-        .at(1).isType(EdmTechProvider.nameString);
+        .goFilter().root().isMember()
+        .isMemberStartType(EdmTechProvider.nameCTBase).goPath()
+        //.at(0)
+        //.isUriPathInfoKind(UriResourceKind.startingTypeFilter)
+        //.isType(EdmTechProvider.nameCTTwoPrim, false)
+        //.isTypeFilterOnEntry(EdmTechProvider.nameCTBase)
+        .at(0).isType(EdmTechProvider.nameString);
 
     // on Complex collection
     testUri.run("FICRTCollCTTwoPrimParam(ParameterInt16=1,ParameterString='2')?"
         + "$filter=com.sap.odata.test1.CTBase/AdditionalPropString")
-        .goFilter().root().isMember().goPath()
-        .at(0)
-        .isUriPathInfoKind(UriResourceKind.startingTypeFilter)
-        .isType(EdmTechProvider.nameCTTwoPrim, true)
-        .isTypeFilterOnCollection(EdmTechProvider.nameCTBase)
-        .at(1).isType(EdmTechProvider.nameString);
+        .goFilter().root().isMember()
+        .isMemberStartType(EdmTechProvider.nameCTBase).goPath()
+        //.at(0)
+        //.isUriPathInfoKind(UriResourceKind.startingTypeFilter)
+        //.isType(EdmTechProvider.nameCTTwoPrim, true)
+        //.isTypeFilterOnCollection(EdmTechProvider.nameCTBase)
+        .at(0).isType(EdmTechProvider.nameString);
 
   }
 
@@ -1116,16 +1120,10 @@ public class TestUriParserImpl {
         .isComplexProperty("PropertyComplex", EdmTechProvider.nameCTAllPrim, false);
 
     testUri.run("ESTwoKeyNav?$select=com.sap.odata.test1.ETBaseTwoKeyNav")
-        .goSelectItemPath(0)
-        .first()
-        .isUriPathInfoKind(UriResourceKind.startingTypeFilter)
-        .isTypeFilterOnCollection(EdmTechProvider.nameETBaseTwoKeyNav);
+        .isSelectStartType(0,EdmTechProvider.nameETBaseTwoKeyNav);
 
     testUri.run("ESTwoKeyNav/PropertyComplexNav?$select=com.sap.odata.test1.CTTwoBasePrimCompNav")
-        .goSelectItemPath(0)
-        .first()
-        .isUriPathInfoKind(UriResourceKind.startingTypeFilter)
-        .isTypeFilterOnCollection(EdmTechProvider.nameCTTwoBasePrimCompNav);
+        .isSelectStartType(0,EdmTechProvider.nameCTTwoBasePrimCompNav);
 
     testUri.run("ESTwoKeyNav?$select=PropertyComplexNav/com.sap.odata.test1.CTTwoBasePrimCompNav")
         .goSelectItemPath(0)

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionTest.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionTest.java
index 0f4c737..2939395 100644
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionTest.java
+++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/QueryOptionTest.java
@@ -29,7 +29,7 @@ import org.apache.olingo.odata4.server.api.uri.UriInfoResource;
 import org.apache.olingo.odata4.server.api.uri.queryoption.SupportedQueryOptions;
 import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl;
+import org.apache.olingo.odata4.server.core.uri.UriInfoImpl;
 import org.apache.olingo.odata4.server.core.uri.queryoption.expression.AliasImpl;
 import org.apache.olingo.odata4.server.core.uri.queryoption.expression.ExpressionImpl;
 import org.apache.olingo.odata4.server.core.uri.queryoption.expression.LiteralImpl;
@@ -109,8 +109,8 @@ public class QueryOptionTest {
 
     option = new ExpandItemImpl();
     UriInfoResource resource = new UriInfoImpl().asUriInfoResource();
-    option.setResourceInfo(resource);
-    assertEquals(resource, option.getResourceInfo());
+    option.setResourcePath(resource);
+    assertEquals(resource, option.getResourcePath());
 
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/32467b8d/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionTest.java
----------------------------------------------------------------------
diff --git a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionTest.java b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionTest.java
index 6d29be5..9c22a61 100644
--- a/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionTest.java
+++ b/odata4-lib/odata4-server-core/src/test/java/org/apache/olingo/odata4/server/core/uri/queryoption/expression/ExpressionTest.java
@@ -38,10 +38,10 @@ import org.apache.olingo.odata4.server.api.uri.queryoption.expression.UnaryOpera
 import org.apache.olingo.odata4.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechProvider;
 import org.apache.olingo.odata4.server.core.testutil.EdmTechTestProvider;
-import org.apache.olingo.odata4.server.core.testutil.FilterTreeToText;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriInfoImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceActionImpl;
-import org.apache.olingo.odata4.server.core.uri.apiimpl.UriResourceFunctionImpl;
+import org.apache.olingo.odata4.server.core.uri.UriInfoImpl;
+import org.apache.olingo.odata4.server.core.uri.UriResourceActionImpl;
+import org.apache.olingo.odata4.server.core.uri.UriResourceFunctionImpl;
+import org.apache.olingo.odata4.server.core.uri.testutil.FilterTreeToText;
 import org.junit.Test;
 
 public class ExpressionTest {
@@ -135,11 +135,11 @@ public class ExpressionTest {
     EdmAction action = edm.getAction(EdmTechProvider.nameUARTPrimParam, null, null);
     UriInfoResource uriInfo = new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
         new UriResourceActionImpl().setAction(action)).asUriInfoResource();
-    expression.setPath(uriInfo);
+    expression.setResourcePath(uriInfo);
     assertEquals(action.getReturnType().getType(), expression.getType());
 
     // check accept and path
-    assertEquals(uriInfo, expression.getPath());
+    assertEquals(uriInfo, expression.getResourcePath());
     assertEquals("<UARTPrimParam>", expression.accept(new FilterTreeToText()));
 
     // UriResourceImplTyped check collection = false case
@@ -147,21 +147,21 @@ public class ExpressionTest {
 
     // UriResourceImplTyped check collection = true case
     action = edm.getAction(EdmTechProvider.nameUARTPrimCollParam, null, null);
-    expression.setPath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
+    expression.setResourcePath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
         new UriResourceActionImpl().setAction(action))
         .asUriInfoResource());
     assertEquals(true, expression.isCollection());
 
     // UriResourceImplTyped with filter
     action = edm.getAction(EdmTechProvider.nameUARTPrimParam, null, null);
-    expression.setPath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
+    expression.setResourcePath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
         new UriResourceActionImpl().setAction(action).setTypeFilter(entityType))
         .asUriInfoResource());
     assertEquals(entityType, expression.getType());
 
     // UriResourceImplKeyPred
     EdmFunction function = edm.getFunction(EdmTechProvider.nameUFCRTETKeyNav, null, null, null);
-    expression.setPath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
+    expression.setResourcePath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
         new UriResourceFunctionImpl().setFunction(function))
         .asUriInfoResource());
     assertEquals(function.getReturnType().getType(), expression.getType());
@@ -170,7 +170,7 @@ public class ExpressionTest {
     EdmEntityType entityBaseType = edm.getEntityType(EdmTechProvider.nameETBaseTwoKeyNav);
     function = edm.getFunction(EdmTechProvider.nameUFCRTESTwoKeyNavParam, null, null,
         Arrays.asList(("ParameterInt16")));
-    expression.setPath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
+    expression.setResourcePath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
         new UriResourceFunctionImpl().setFunction(function).setEntryTypeFilter(entityBaseType))
         .asUriInfoResource());
     assertEquals(entityBaseType, expression.getType());
@@ -179,7 +179,7 @@ public class ExpressionTest {
     entityBaseType = edm.getEntityType(EdmTechProvider.nameETBaseTwoKeyNav);
     function = edm.getFunction(EdmTechProvider.nameUFCRTESTwoKeyNavParam, null, null,
         Arrays.asList(("ParameterInt16")));
-    expression.setPath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
+    expression.setResourcePath(new UriInfoImpl().setKind(UriInfoKind.resource).addResourcePart(
         new UriResourceFunctionImpl().setFunction(function).setCollectionTypeFilter(entityBaseType))
         .asUriInfoResource());
     assertEquals(entityBaseType, expression.getType());
@@ -188,7 +188,7 @@ public class ExpressionTest {
     entityBaseType = edm.getEntityType(EdmTechProvider.nameETBaseTwoKeyNav);
     function = edm.getFunction(EdmTechProvider.nameUFCRTESTwoKeyNavParam, null, null,
         Arrays.asList(("ParameterInt16")));
-    expression.setPath(new UriInfoImpl().setKind(UriInfoKind.all));
+    expression.setResourcePath(new UriInfoImpl().setKind(UriInfoKind.all));
     assertEquals(null, expression.getType());
 
     // no typed collection else case