@Test
public void testComplexPropertyPathExp() throws Exception {

  final String entitySetName = "ESName";
  final String keyPropertyName = "a";
  final String complexPropertyName = "comp";
  final String propertyName = "prop";
  EdmProperty keyProperty = mockProperty(keyPropertyName, 
      OData.newInstance().createPrimitiveTypeInstance(EdmPrimitiveTypeKind.String));
  EdmKeyPropertyRef keyPropertyRef = mockKeyPropertyRef(keyPropertyName, keyProperty);
  EdmProperty property = mockProperty(propertyName, 
      OData.newInstance().createPrimitiveTypeInstance(EdmPrimitiveTypeKind.String));
  
  EdmComplexType complexType = mockComplexType(propertyName, property);
  EdmProperty complexProperty = mockProperty(complexPropertyName, complexType);
  
  EdmEntityType entityType = mockEntityType(keyPropertyName, keyPropertyRef);
  Mockito.when(entityType.getPropertyNames()).thenReturn(Arrays.asList(keyPropertyName, complexPropertyName));
  Mockito.when(entityType.getProperty(keyPropertyName)).thenReturn(keyProperty);
  Mockito.when(entityType.getProperty(complexPropertyName)).thenReturn(complexProperty);
  EdmEntitySet entitySet = mockEntitySet(entitySetName, entityType);
  EdmEntityContainer container = mockContainer(entitySetName, entitySet);
  Edm mockedEdm = Mockito.mock(Edm.class);
  Mockito.when(mockedEdm.getEntityContainer()).thenReturn(container);
  
  UriTokenizer tokenizer = new UriTokenizer("comp/prop eq \'abc\'");
  Expression expression = new ExpressionParser(mockedEdm, odata).parse(tokenizer, 
      entityType, null, null);
  assertNotNull(expression);
  assertEquals("{[comp, prop] EQ \'abc\'}", expression.toString());
  
  tokenizer = new UriTokenizer("comp/prop in (\'abc\','xyz')");
  expression = new ExpressionParser(mockedEdm, odata).parse(tokenizer, 
      entityType, null, null);
  assertNotNull(expression);
  assertEquals("{[comp, prop] IN [\'abc\', \'xyz\']}", expression.toString());
}