@Test
public void testNavigationPropertyPathExp() throws Exception {

  final String entitySetName = "ESName";
  final String keyPropertyName = "a";
  final String complexPropertyName = "comp";
  final String propertyName = "navProp";
  EdmProperty keyProperty = mockProperty(keyPropertyName, 
      OData.newInstance().createPrimitiveTypeInstance(EdmPrimitiveTypeKind.String));
  EdmKeyPropertyRef keyPropertyRef = mockKeyPropertyRef(keyPropertyName, keyProperty);
  
  EdmEntityType targetEntityType = mockEntityType(keyPropertyName, keyPropertyRef);
  Mockito.when(targetEntityType.getFullQualifiedName()).thenReturn(new FullQualifiedName("test.TargetET"));
  EdmNavigationProperty navProperty = mockNavigationProperty(propertyName, targetEntityType);
  
  EdmComplexType complexType = mockComplexType(propertyName, navProperty);
  EdmProperty complexProperty = mockProperty(complexPropertyName, complexType);
  
  EdmEntityType startEntityType = mockEntityType(keyPropertyName, keyPropertyRef);
  Mockito.when(startEntityType.getFullQualifiedName()).thenReturn(new FullQualifiedName("test.StartET"));
  Mockito.when(startEntityType.getPropertyNames()).thenReturn(
      Arrays.asList(keyPropertyName, complexPropertyName));
  Mockito.when(startEntityType.getProperty(keyPropertyName)).thenReturn(keyProperty);
  Mockito.when(startEntityType.getProperty(complexPropertyName)).thenReturn(complexProperty);
  EdmEntitySet entitySet = mockEntitySet(entitySetName, startEntityType);
  EdmEntityContainer container = mockContainer(entitySetName, entitySet);
  Edm mockedEdm = Mockito.mock(Edm.class);
  Mockito.when(mockedEdm.getEntityContainer()).thenReturn(container);
  
  UriTokenizer tokenizer = new UriTokenizer("comp/navProp");
  final Expression expression = new ExpressionParser(mockedEdm, odata).parse(tokenizer, 
      startEntityType, null, null);
  assertNotNull(expression);
  assertEquals("[comp, navProp]", expression.toString());
}