You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by sk...@apache.org on 2014/05/09 11:12:26 UTC

[15/15] git commit: [OLINGO-266] move provider and test to ref module

[OLINGO-266] move provider and test to ref module


Project: http://git-wip-us.apache.org/repos/asf/olingo-odata4/repo
Commit: http://git-wip-us.apache.org/repos/asf/olingo-odata4/commit/554c795e
Tree: http://git-wip-us.apache.org/repos/asf/olingo-odata4/tree/554c795e
Diff: http://git-wip-us.apache.org/repos/asf/olingo-odata4/diff/554c795e

Branch: refs/heads/olingo-266-ref
Commit: 554c795e4c5f7999d49ba99e2c92a2cb41f31658
Parents: e5cfd8e
Author: Stephan Klevenz <st...@sap.com>
Authored: Fri May 9 11:09:55 2014 +0200
Committer: Stephan Klevenz <st...@sap.com>
Committed: Fri May 9 11:10:16 2014 +0200

----------------------------------------------------------------------
 lib/ref/pom.xml                                 |   47 +-
 .../core/testutil/EdmTechTestProvider.java      |  100 +
 .../server/core/testutil/StringUtils.java       |   52 +
 .../testutil/techprovider/ActionProvider.java   |  191 +
 .../techprovider/ComplexTypeProvider.java       |  175 +
 .../techprovider/ContainerProvider.java         |  361 ++
 .../testutil/techprovider/EdmTechProvider.java  |  147 +
 .../techprovider/EntityTypeProvider.java        |  408 ++
 .../testutil/techprovider/EnumTypeProvider.java |   47 +
 .../testutil/techprovider/FunctionProvider.java |  852 +++
 .../testutil/techprovider/PropertyProvider.java |  590 ++
 .../testutil/techprovider/SchemaProvider.java   |  250 +
 .../techprovider/TypeDefinitionProvider.java    |   30 +
 .../serializer/json/ServiceDocumentTest.java    |  133 +
 .../serializer/xml/MetadataDocumentTest.java    |  252 +
 .../olingo/server/core/uri/RawUriTest.java      |  151 +
 .../olingo/server/core/uri/UriInfoImplTest.java |  201 +
 .../server/core/uri/UriResourceImplTest.java    |  508 ++
 .../core/uri/antlr/TestFullResourcePath.java    | 5110 ++++++++++++++++++
 .../olingo/server/core/uri/antlr/TestLexer.java |  248 +
 .../core/uri/antlr/TestUriParserImpl.java       | 1144 ++++
 .../core/uri/queryoption/QueryOptionTest.java   |  303 ++
 .../queryoption/expression/ExpressionTest.java  |  239 +
 .../core/uri/testutil/ExpandValidator.java      |  230 +
 .../core/uri/testutil/FilterTreeToText.java     |  154 +
 .../core/uri/testutil/FilterValidator.java      |  534 ++
 .../core/uri/testutil/ParseTreeToText.java      |   82 +
 .../core/uri/testutil/ParserValidator.java      |  162 +
 .../core/uri/testutil/ParserWithLogging.java    |   56 +
 .../core/uri/testutil/ResourceValidator.java    |  599 ++
 .../core/uri/testutil/TestErrorLogger.java      |  105 +
 .../core/uri/testutil/TestUriValidator.java     |  258 +
 .../server/core/uri/testutil/TestValidator.java |   23 +
 .../core/uri/testutil/TokenValidator.java       |  194 +
 .../core/uri/testutil/UriLexerWithTrace.java    |   85 +
 .../core/uri/validator/UriValidatorTest.java    |  378 ++
 .../serializer/json/ServiceDocumentTest.java    |  133 -
 .../serializer/xml/MetadataDocumentTest.java    |  252 -
 .../server/core/testutil/EdmTechProvider.java   | 1976 -------
 .../core/testutil/EdmTechTestProvider.java      |  100 -
 .../server/core/testutil/StringUtils.java       |   52 -
 .../testutil/techprovider/ActionProvider.java   |  191 -
 .../techprovider/ComplexTypeProvider.java       |  175 -
 .../techprovider/ContainerProvider.java         |  361 --
 .../testutil/techprovider/EdmTechProvider.java  |  147 -
 .../techprovider/EntityTypeProvider.java        |  408 --
 .../testutil/techprovider/EnumTypeProvider.java |   47 -
 .../testutil/techprovider/FunctionProvider.java |  852 ---
 .../testutil/techprovider/PropertyProvider.java |  590 --
 .../testutil/techprovider/SchemaProvider.java   |  250 -
 .../techprovider/TypeDefinitionProvider.java    |   30 -
 .../olingo/server/core/uri/RawUriTest.java      |  151 -
 .../olingo/server/core/uri/UriInfoImplTest.java |  201 -
 .../server/core/uri/UriResourceImplTest.java    |  508 --
 .../core/uri/antlr/TestFullResourcePath.java    | 5110 ------------------
 .../olingo/server/core/uri/antlr/TestLexer.java |  248 -
 .../core/uri/antlr/TestUriParserImpl.java       | 1144 ----
 .../core/uri/queryoption/QueryOptionTest.java   |  303 --
 .../queryoption/expression/ExpressionTest.java  |  239 -
 .../core/uri/testutil/ExpandValidator.java      |  230 -
 .../core/uri/testutil/FilterTreeToText.java     |  154 -
 .../core/uri/testutil/FilterValidator.java      |  534 --
 .../core/uri/testutil/ParseTreeToText.java      |   82 -
 .../core/uri/testutil/ParserValidator.java      |  162 -
 .../core/uri/testutil/ParserWithLogging.java    |   56 -
 .../core/uri/testutil/ResourceValidator.java    |  599 --
 .../core/uri/testutil/TestErrorLogger.java      |  105 -
 .../core/uri/testutil/TestUriValidator.java     |  258 -
 .../server/core/uri/testutil/TestValidator.java |   23 -
 .../core/uri/testutil/TokenValidator.java       |  194 -
 .../core/uri/testutil/UriLexerWithTrace.java    |   85 -
 .../core/uri/validator/UriValidatorTest.java    |  378 --
 72 files changed, 14381 insertions(+), 16346 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/554c795e/lib/ref/pom.xml
----------------------------------------------------------------------
diff --git a/lib/ref/pom.xml b/lib/ref/pom.xml
index c928418..fe1da60 100644
--- a/lib/ref/pom.xml
+++ b/lib/ref/pom.xml
@@ -1,26 +1,26 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
 
-    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.
+  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.
 
 -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
   <modelVersion>4.0.0</modelVersion>
 
   <artifactId>olingo-ref</artifactId>
@@ -42,9 +42,20 @@
     </dependency>
     <dependency>
       <groupId>org.apache.olingo</groupId>
-      <artifactId>olingo-client-api</artifactId>
+      <artifactId>olingo-server-core</artifactId>
       <version>${project.version}</version>
+      <scope>runtime</scope>
     </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-all</artifactId>
+    </dependency>
+
   </dependencies>
 
 </project>

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/554c795e/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
----------------------------------------------------------------------
diff --git a/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
new file mode 100644
index 0000000..bee5f90
--- /dev/null
+++ b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
@@ -0,0 +1,100 @@
+/*
+ * 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.server.core.testutil;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.server.api.edm.provider.ComplexType;
+import org.apache.olingo.server.api.edm.provider.EntitySet;
+import org.apache.olingo.server.api.edm.provider.EntityType;
+import org.apache.olingo.server.api.edm.provider.Property;
+import org.apache.olingo.server.api.edm.provider.PropertyRef;
+import org.apache.olingo.server.core.testutil.techprovider.EdmTechProvider;
+
+/**
+ * Implement the EdmTechProvider and
+ * <li>adds a entity type <b>ETabc with</b> properties a,b,c,d,e,f</li>
+ * <li>adds a complex type <b>CTabc</b> with properties a,b,c,d,e,f</li>
+ * <li>adds a <b>abc</b> entity set of type <b>ETabc</b></li>
+ */
+public class EdmTechTestProvider extends EdmTechProvider {
+
+  private static final FullQualifiedName nameInt16 = EdmPrimitiveTypeKind.Int16.getFullQualifiedName();
+  public static final String nameSpace = "com.sap.odata.test1";
+  public static final FullQualifiedName nameContainer = new FullQualifiedName(nameSpace, "Container");
+
+  Property propertyAInt16 = new Property().setName("a").setType(nameInt16);
+  Property propertyBInt16 = new Property().setName("b").setType(nameInt16);
+  Property propertyCInt16 = new Property().setName("c").setType(nameInt16);
+  Property propertyDInt16 = new Property().setName("d").setType(nameInt16);
+  Property propertyEInt16 = new Property().setName("e").setType(nameInt16);
+  Property propertyFInt16 = new Property().setName("f").setType(nameInt16);
+
+  public static final FullQualifiedName nameCTabc = new FullQualifiedName(nameSpace, "CTabc");
+  public static final FullQualifiedName nameETabc = new FullQualifiedName(nameSpace, "ETabc");
+
+  @Override
+  public ComplexType getComplexType(final FullQualifiedName complexTypeName) throws ODataException {
+    if (complexTypeName.equals(nameCTabc)) {
+      return new ComplexType()
+          .setName("CTabc")
+          .setProperties(Arrays.asList(
+              propertyAInt16, propertyBInt16, propertyCInt16,
+              propertyDInt16, propertyEInt16, propertyFInt16
+              ));
+
+    }
+
+    return super.getComplexType(complexTypeName);
+  }
+
+  @Override
+  public EntitySet getEntitySet(final FullQualifiedName entityContainer, final String name) throws ODataException {
+    if (nameContainer.equals(entityContainer)) {
+      if (name.equals("ESabc")) {
+        return new EntitySet()
+            .setName("ESabc")
+            .setType(nameETabc);
+      }
+    }
+
+    return super.getEntitySet(entityContainer, name);
+  }
+
+  @Override
+  public EntityType getEntityType(final FullQualifiedName entityTypeName) throws ODataException {
+    List<PropertyRef> oneKeyPropertyInt16 = Arrays.asList(new PropertyRef().setPropertyName("a"));
+
+    if (entityTypeName.equals(nameETabc)) {
+      return new EntityType()
+          .setName("ETabc")
+          .setProperties(Arrays.asList(
+              propertyAInt16, propertyBInt16, propertyCInt16,
+              propertyDInt16, propertyEInt16, propertyFInt16))
+          .setKey(oneKeyPropertyInt16);
+    }
+
+    return super.getEntityType(entityTypeName);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/554c795e/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/StringUtils.java
----------------------------------------------------------------------
diff --git a/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/StringUtils.java b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/StringUtils.java
new file mode 100644
index 0000000..8cabcf1
--- /dev/null
+++ b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/StringUtils.java
@@ -0,0 +1,52 @@
+/*
+ * 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.server.core.testutil;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.nio.charset.Charset;
+
+public class StringUtils {
+
+  public static String inputStreamToString(final InputStream in, final boolean preserveLineBreaks) {
+    try {
+      final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(in, Charset.forName("UTF-8")));
+      final StringBuilder stringBuilder = new StringBuilder();
+      String line = null;
+
+      while ((line = bufferedReader.readLine()) != null) {
+        stringBuilder.append(line);
+        if (preserveLineBreaks) {
+          stringBuilder.append("\n");
+        }
+      }
+
+      bufferedReader.close();
+
+      final String result = stringBuilder.toString();
+
+      return result;
+    } catch (IOException e) {
+      throw new RuntimeException(e);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/554c795e/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ActionProvider.java
----------------------------------------------------------------------
diff --git a/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ActionProvider.java b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ActionProvider.java
new file mode 100644
index 0000000..f1748a7
--- /dev/null
+++ b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ActionProvider.java
@@ -0,0 +1,191 @@
+/*
+ * 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.server.core.testutil.techprovider;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.server.api.edm.provider.Action;
+import org.apache.olingo.server.api.edm.provider.Parameter;
+import org.apache.olingo.server.api.edm.provider.ReturnType;
+
+public class ActionProvider {
+
+  // Bound Actions
+  public static final FullQualifiedName nameBAESAllPrimRTETAllPrim =
+      new FullQualifiedName(SchemaProvider.nameSpace, "BAESAllPrimRTETAllPrim");
+
+  public static final FullQualifiedName nameBAESTwoKeyNavRTESTwoKeyNav =
+      new FullQualifiedName(SchemaProvider.nameSpace, "BAESTwoKeyNavRTESTwoKeyNav");
+
+  public static final FullQualifiedName nameBAETBaseTwoKeyNavRTETBaseTwoKeyNav =
+      new FullQualifiedName(SchemaProvider.nameSpace, "BAETBaseTwoKeyNavRTETBaseTwoKeyNav");
+
+  public static final FullQualifiedName nameBAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav =
+      new FullQualifiedName(SchemaProvider.nameSpace, "BAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav");
+
+  public static final FullQualifiedName nameBAETTwoKeyNavRTETTwoKeyNav =
+      new FullQualifiedName(SchemaProvider.nameSpace, "BAETTwoKeyNavRTETTwoKeyNav");
+
+  // Unbound Actions
+  public static final FullQualifiedName nameUARTCompCollParam = new FullQualifiedName(SchemaProvider.nameSpace,
+      "UARTCompCollParam");
+  public static final FullQualifiedName nameUARTCompParam = new FullQualifiedName(SchemaProvider.nameSpace,
+      "UARTCompParam");
+  public static final FullQualifiedName nameUARTESParam =
+      new FullQualifiedName(SchemaProvider.nameSpace, "UARTESParam");
+
+  public static final FullQualifiedName nameUARTETParam =
+      new FullQualifiedName(SchemaProvider.nameSpace, "UARTETParam");
+
+  public static final FullQualifiedName nameUARTPrimParam = new FullQualifiedName(SchemaProvider.nameSpace,
+      "UARTPrimParam");
+  public static final FullQualifiedName nameUARTPrimCollParam = new FullQualifiedName(SchemaProvider.nameSpace,
+      "UARTPrimCollParam");
+
+  public List<Action> getActions(final FullQualifiedName actionName) throws ODataException {
+    if (actionName.equals(nameUARTPrimParam)) {
+      return Arrays.asList(
+          new Action().setName("UARTPrimParam")
+              .setParameters(Arrays.asList(
+                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+
+              .setReturnType(new ReturnType().setType(PropertyProvider.nameString))
+          );
+
+    } else if (actionName.equals(nameUARTPrimCollParam)) {
+      return Arrays.asList(
+          new Action().setName("UARTPrimCollParam")
+              .setParameters(Arrays.asList(
+                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+
+              .setReturnType(
+                  new ReturnType().setType(PropertyProvider.nameString).setCollection(true))
+          );
+
+    } else if (actionName.equals(nameUARTCompParam)) {
+      return Arrays.asList(
+          new Action().setName("UARTCompParam")
+              .setParameters(Arrays.asList(
+                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+
+              .setReturnType(
+                  new ReturnType().setType(ComplexTypeProvider.nameCTTwoPrim))
+          );
+
+    } else if (actionName.equals(nameUARTCompCollParam)) {
+      return Arrays.asList(
+          new Action().setName("UARTCompCollParam")
+              .setParameters(Arrays.asList(
+                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+
+              .setReturnType(
+                  new ReturnType().setType(ComplexTypeProvider.nameCTTwoPrim).setCollection(true))
+          );
+
+    } else if (actionName.equals(nameUARTETParam)) {
+      return Arrays.asList(
+          new Action().setName("UARTETParam")
+              .setParameters(Arrays.asList(
+                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+              .setReturnType(
+                  new ReturnType().setType(EntityTypeProvider.nameETTwoKeyTwoPrim))
+          );
+
+    } else if (actionName.equals(nameUARTESParam)) {
+      return Arrays.asList(
+          new Action().setName("UARTESParam")
+              .setParameters(Arrays.asList(
+                  new Parameter().setName("ParameterInt16").setType(PropertyProvider.nameInt16)))
+              .setReturnType(
+                  new ReturnType().setType(EntityTypeProvider.nameETKeyNav).setCollection(true))
+          );
+
+    } else if (actionName.equals(nameBAETTwoKeyNavRTETTwoKeyNav)) {
+      return Arrays.asList(
+          new Action().setName("BAETTwoKeyNavRTETTwoKeyNav")
+              .setParameters(Arrays.asList(
+                  new Parameter().setName("ParameterETTwoKeyNav").setType(EntityTypeProvider.nameETTwoKeyNav)
+                      .setNullable(false)))
+              .setBound(true)
+              .setReturnType(
+                  new ReturnType().setType(EntityTypeProvider.nameETTwoKeyNav))
+          ,
+          new Action().setName("BAETTwoKeyNavRTETTwoKeyNav")
+              .setParameters(Arrays.asList(
+                  new Parameter().setName("ParameterETKeyNav").setType(EntityTypeProvider.nameETKeyNav)
+                      .setNullable(false)))
+              .setBound(true)
+              .setReturnType(
+                  new ReturnType().setType(EntityTypeProvider.nameETTwoKeyNav))
+          );
+
+    } else if (actionName.equals(nameBAESAllPrimRTETAllPrim)) {
+      return Arrays.asList(
+          new Action().setName("BAESAllPrimRTETAllPrim")
+              .setParameters(
+                  Arrays.asList(
+                      new Parameter().setName("ParameterESAllPrim").setType(EntityTypeProvider.nameETAllPrim)
+                          .setCollection(true).setNullable(false)))
+              .setBound(true)
+              .setReturnType(
+                  new ReturnType().setType(EntityTypeProvider.nameETAllPrim))
+          );
+
+    } else if (actionName.equals(nameBAESTwoKeyNavRTESTwoKeyNav)) {
+      return Arrays.asList(
+          new Action().setName("BAESTwoKeyNavRTESTwoKeyNav")
+              .setParameters(
+                  Arrays.asList(
+                      new Parameter().setName("ParameterETTwoKeyNav").setType(EntityTypeProvider.nameETTwoKeyNav)
+                          .setCollection(true).setNullable(false)))
+              .setBound(true)
+              .setReturnType(
+                  new ReturnType().setType(EntityTypeProvider.nameETTwoKeyNav).setCollection(true))
+          );
+
+    } else if (actionName.equals(nameBAETBaseTwoKeyNavRTETBaseTwoKeyNav)) {
+      return Arrays.asList(
+          new Action().setName("BAETBaseTwoKeyNavRTETBaseTwoKeyNav")
+              .setParameters(Arrays.asList(
+                  new Parameter().setName("ParameterETTwoKeyNav").setType(EntityTypeProvider.nameETBaseTwoKeyNav)
+                      .setNullable(false)))
+              .setBound(true)
+              .setReturnType(
+                  new ReturnType().setType(EntityTypeProvider.nameETTwoKeyNav))
+          );
+
+    } else if (actionName.equals(nameBAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav)) {
+      return Arrays.asList(
+          new Action().setName("BAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav")
+              .setParameters(
+                  Arrays.asList(
+                      new Parameter().setName("ParameterETTwoBaseTwoKeyNav").setType(
+                          EntityTypeProvider.nameETTwoBaseTwoKeyNav).setNullable(false)))
+              .setBound(true)
+              .setReturnType(
+                  new ReturnType().setType(EntityTypeProvider.nameETBaseTwoKeyNav))
+          );
+    }
+
+    return null;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/554c795e/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ComplexTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ComplexTypeProvider.java b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ComplexTypeProvider.java
new file mode 100644
index 0000000..2db6d0e
--- /dev/null
+++ b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ComplexTypeProvider.java
@@ -0,0 +1,175 @@
+/*
+ * 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.server.core.testutil.techprovider;
+
+import java.util.Arrays;
+
+import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.server.api.edm.provider.ComplexType;
+import org.apache.olingo.server.api.edm.provider.NavigationProperty;
+import org.apache.olingo.server.api.edm.provider.Property;
+
+public class ComplexTypeProvider {
+
+  public static final FullQualifiedName nameCTAllPrim = new FullQualifiedName(SchemaProvider.nameSpace, "CTAllPrim");
+  public static final FullQualifiedName nameCTBase = new FullQualifiedName(SchemaProvider.nameSpace, "CTBase");
+  public static final FullQualifiedName nameCTBasePrimCompNav = new FullQualifiedName(SchemaProvider.nameSpace,
+      "CTBasePrimCompNav");
+  public static final FullQualifiedName nameCTCollAllPrim = new FullQualifiedName(SchemaProvider.nameSpace,
+      "CTCollAllPrim");
+  public static final FullQualifiedName nameCTCompCollComp = new FullQualifiedName(SchemaProvider.nameSpace,
+      "CTCompCollComp");
+  public static final FullQualifiedName nameCTCompComp = new FullQualifiedName(SchemaProvider.nameSpace, "CTCompComp");
+  public static final FullQualifiedName nameCTCompNav = new FullQualifiedName(SchemaProvider.nameSpace, "CTCompNav");
+
+  public static final FullQualifiedName nameCTMixPrimCollComp = new FullQualifiedName(SchemaProvider.nameSpace,
+      "CTMixPrimCollComp");
+  public static final FullQualifiedName nameCTNavFiveProp = new FullQualifiedName(SchemaProvider.nameSpace,
+      "CTNavFiveProp");
+  public static final FullQualifiedName nameCTPrim = new FullQualifiedName(SchemaProvider.nameSpace, "CTPrim");
+  public static final FullQualifiedName nameCTPrimComp = new FullQualifiedName(SchemaProvider.nameSpace, "CTPrimComp");
+  public static final FullQualifiedName nameCTPrimEnum = new FullQualifiedName(SchemaProvider.nameSpace, "CTPrimEnum");
+  public static final FullQualifiedName nameCTTwoBase = new FullQualifiedName(SchemaProvider.nameSpace, "CTTwoBase");
+  public static final FullQualifiedName nameCTTwoBasePrimCompNav =
+      new FullQualifiedName(SchemaProvider.nameSpace, "CTTwoBasePrimCompNav");
+  public static final FullQualifiedName nameCTTwoPrim = new FullQualifiedName(SchemaProvider.nameSpace, "CTTwoPrim");
+
+  public ComplexType getComplexType(final FullQualifiedName complexTypeName) throws ODataException {
+
+    if (complexTypeName.equals(nameCTPrim)) {
+      return new ComplexType()
+          .setName("CTPrim")
+          .setProperties(Arrays.asList(PropertyProvider.propertyInt16));
+
+    } else if (complexTypeName.equals(nameCTAllPrim)) {
+      return new ComplexType()
+          .setName("CTAllPrim")
+          .setProperties(
+              Arrays.asList(PropertyProvider.propertyString, PropertyProvider.propertyBinary,
+                  PropertyProvider.propertyBoolean, PropertyProvider.propertyByte, PropertyProvider.propertyDate,
+                  PropertyProvider.propertyDateTimeOffset, PropertyProvider.propertyDecimal,
+                  PropertyProvider.propertySingle, PropertyProvider.propertyDouble, PropertyProvider.propertyDuration,
+                  PropertyProvider.propertyGuid, PropertyProvider.propertyInt16, PropertyProvider.propertyInt32,
+                  PropertyProvider.propertyInt64, PropertyProvider.propertySByte, PropertyProvider.propertyTimeOfDay
+                  /* TODO add propertyStream */));
+
+    } else if (complexTypeName.equals(nameCTCollAllPrim)) {
+      return new ComplexType()
+          .setName("CTCollAllPrim")
+          .setProperties(
+              Arrays.asList(
+                  PropertyProvider.collPropertyString, PropertyProvider.collPropertyBoolean,
+                  PropertyProvider.collPropertyByte, PropertyProvider.collPropertySByte,
+                  PropertyProvider.collPropertyInt16, PropertyProvider.collPropertyInt32,
+                  PropertyProvider.collPropertyInt64, PropertyProvider.collPropertySingle,
+                  PropertyProvider.collPropertyDouble, PropertyProvider.collPropertyDecimal,
+                  PropertyProvider.collPropertyBinary, PropertyProvider.collPropertyDate,
+                  PropertyProvider.collPropertyDateTimeOffset, PropertyProvider.collPropertyDuration,
+                  PropertyProvider.collPropertyGuid, PropertyProvider.collPropertyTimeOfDay
+                  /* TODO add collectionPropertyStream */));
+
+    } else if (complexTypeName.equals(nameCTTwoPrim)) {
+      return new ComplexType()
+          .setName("CTTwoPrim")
+          .setProperties(Arrays.asList(PropertyProvider.propertyInt16, PropertyProvider.propertyString));
+
+    } else if (complexTypeName.equals(nameCTCompNav)) {
+      return new ComplexType()
+          .setName("CTCompNav")
+          .setProperties(Arrays.asList(PropertyProvider.propertyString,
+              PropertyProvider.propertyComplex_CTNavFiveProp));
+
+    } else if (complexTypeName.equals(nameCTMixPrimCollComp)) {
+      return new ComplexType()
+          .setName("CTMixPrimCollComp")
+          .setProperties(
+              Arrays.asList(PropertyProvider.propertyInt16, PropertyProvider.collPropertyString,
+                  PropertyProvider.propertyComplex_CTTwoPrim, PropertyProvider.collPropertyComplex_CTTwoPrim));
+
+    } else if (complexTypeName.equals(nameCTBase)) {
+      return new ComplexType()
+          .setName("CTBase")
+          .setBaseType(nameCTTwoPrim)
+          .setProperties(Arrays.asList(
+              new Property()
+                  .setName("AdditionalPropString")
+                  .setType(new FullQualifiedName("Edm", "String"))));
+
+    } else if (complexTypeName.equals(nameCTTwoBase)) {
+      return new ComplexType()
+          .setName("CTTwoBase")
+          .setBaseType(nameCTBase);
+
+    } else if (complexTypeName.equals(nameCTCompComp)) {
+      return new ComplexType()
+          .setName("CTCompComp")
+          .setProperties(Arrays.asList(PropertyProvider.propertyComplex_CTTwoPrim));
+
+    } else if (complexTypeName.equals(nameCTCompCollComp)) {
+      return new ComplexType()
+          .setName("CTCompCollComp")
+          .setProperties(Arrays.asList(PropertyProvider.collPropertyComplex_CTTwoPrim));
+
+    } else if (complexTypeName.equals(nameCTPrimComp)) {
+      return new ComplexType()
+          .setName("CTPrimComp")
+          .setProperties(Arrays.asList(PropertyProvider.propertyInt16, PropertyProvider.propertyComplex_CTAllPrim));
+
+    } else if (complexTypeName.equals(nameCTNavFiveProp)) {
+      return new ComplexType()
+          .setName("CTNavFiveProp")
+          .setProperties(Arrays.asList(PropertyProvider.propertyInt16))
+          .setNavigationProperties((Arrays.asList(
+              PropertyProvider.collectionNavPropertyETTwoKeyNavOne_ETTwoKeyNav,
+              PropertyProvider.collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav,
+              new NavigationProperty()
+                  .setName("NavPropertyETMediaOne")
+                  .setType(EntityTypeProvider.nameETMedia),
+              new NavigationProperty()
+                  .setName("NavPropertyETMediaMany")
+                  .setType(EntityTypeProvider.nameETMedia).setCollection(true)
+              )));
+
+    } else if (complexTypeName.equals(nameCTBasePrimCompNav)) {
+      return new ComplexType()
+          .setName("CTBasePrimCompNav")
+          .setBaseType(nameCTPrimComp)
+          .setNavigationProperties(Arrays.asList(
+              PropertyProvider.collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav,
+              PropertyProvider.collectionNavPropertyETTwoKeyNavOne_ETTwoKeyNav,
+              PropertyProvider.navPropertyETKeyNavOne_ETKeyNav,
+              PropertyProvider.collectionNavPropertyETKeyNavMany_ETKeyNav));
+
+    } else if (complexTypeName.equals(nameCTPrimEnum)) {
+      return new ComplexType()
+          .setName("CTPrimEnum")
+          .setProperties(Arrays.asList(PropertyProvider.propertyInt16, PropertyProvider.propertyEnumString_ENString));
+
+    } else if (complexTypeName.equals(nameCTTwoBasePrimCompNav)) {
+      return new ComplexType()
+          .setName("CTTwoBasePrimCompNav")
+          .setBaseType(nameCTBasePrimCompNav);
+
+    }
+
+    return null;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/554c795e/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ContainerProvider.java
----------------------------------------------------------------------
diff --git a/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ContainerProvider.java b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ContainerProvider.java
new file mode 100644
index 0000000..5b92317
--- /dev/null
+++ b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/ContainerProvider.java
@@ -0,0 +1,361 @@
+/*
+ * 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.server.core.testutil.techprovider;
+
+import java.util.Arrays;
+
+import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.commons.api.edm.Target;
+import org.apache.olingo.server.api.edm.provider.ActionImport;
+import org.apache.olingo.server.api.edm.provider.EntityContainer;
+import org.apache.olingo.server.api.edm.provider.EntityContainerInfo;
+import org.apache.olingo.server.api.edm.provider.EntitySet;
+import org.apache.olingo.server.api.edm.provider.FunctionImport;
+import org.apache.olingo.server.api.edm.provider.NavigationPropertyBinding;
+import org.apache.olingo.server.api.edm.provider.Singleton;
+
+public class ContainerProvider {
+
+  public static final FullQualifiedName nameContainer = new FullQualifiedName(SchemaProvider.nameSpace, "Container");
+
+  EntityContainerInfo entityContainerInfoTest1 =
+      new EntityContainerInfo().setContainerName(nameContainer);
+
+  public EntityContainerInfo getEntityContainerInfo(final FullQualifiedName entityContainerName) throws ODataException {
+    if (entityContainerName == null) {
+      return entityContainerInfoTest1;
+    } else if (entityContainerName.equals(nameContainer)) {
+      return entityContainerInfoTest1;
+    }
+
+    return null;
+  }
+
+  public EntityContainer getEntityContainer() throws ODataException {
+    return null;
+  }
+
+  public EntitySet getEntitySet(final FullQualifiedName entityContainer, final String name) throws ODataException {
+    if (entityContainer == nameContainer) {
+      if (name.equals("ESAllPrim")) {
+        return new EntitySet()
+            .setName("ESAllPrim")
+            .setType(EntityTypeProvider.nameETAllPrim);
+
+      } else if (name.equals("ESCollAllPrim")) {
+        return new EntitySet()
+            .setName("ESCollAllPrim")
+            .setType(EntityTypeProvider.nameETCollAllPrim);
+
+      } else if (name.equals("ESTwoPrim")) {
+        return new EntitySet()
+            .setName("ESTwoPrim")
+            .setType(EntityTypeProvider.nameETTwoPrim);
+
+      } else if (name.equals("ESMixPrimCollComp")) {
+        return new EntitySet()
+            .setName("ESMixPrimCollComp")
+            .setType(EntityTypeProvider.nameETMixPrimCollComp);
+
+      } else if (name.equals("ESBase")) {
+        return new EntitySet()
+            .setName("ESBase")
+            .setType(EntityTypeProvider.nameETBase);
+
+      } else if (name.equals("ESTwoBase")) {
+        return new EntitySet()
+            .setName("ESTwoBase")
+            .setType(EntityTypeProvider.nameETTwoBase);
+
+      } else if (name.equals("ESTwoKeyTwoPrim")) {
+        return new EntitySet()
+            .setName("ESTwoKeyTwoPrim")
+            .setType(EntityTypeProvider.nameETTwoKeyTwoPrim);
+
+      } else if (name.equals("ESBaseTwoKeyTwoPrim")) {
+        return new EntitySet()
+            .setName("ESBaseTwoKeyTwoPrim")
+            .setType(EntityTypeProvider.nameETBaseTwoKeyTwoPrim);
+
+      } else if (name.equals("ESTwoBaseTwoKeyTwoPrim")) {
+        return new EntitySet()
+            .setName("ESTwoBaseTwoKeyTwoPrim")
+            .setType(EntityTypeProvider.nameETTwoBaseTwoKeyTwoPrim);
+
+      } else if (name.equals("ESAllKey")) {
+        return new EntitySet()
+            .setName("ESAllKey")
+            .setType(EntityTypeProvider.nameETAllKey);
+
+      } else if (name.equals("ESCompAllPrim")) {
+        return new EntitySet()
+            .setName("ESCompAllPrim")
+            .setType(EntityTypeProvider.nameETCompAllPrim);
+
+      } else if (name.equals("ESCompCollAllPrim")) {
+        return new EntitySet()
+            .setName("ESCompCollAllPrim")
+            .setType(EntityTypeProvider.nameETCompCollAllPrim);
+
+      } else if (name.equals("ESCompComp")) {
+        return new EntitySet()
+            .setName("ESCompComp")
+            .setType(EntityTypeProvider.nameETCompComp);
+
+      } else if (name.equals("ESCompCollComp")) {
+        return new EntitySet()
+            .setName("ESCompCollComp")
+            .setType(EntityTypeProvider.nameETCompCollComp);
+
+      } else if (name.equals("ESMedia")) {
+        return new EntitySet()
+            .setName("ESMedia")
+            .setType(EntityTypeProvider.nameETMedia)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("ESKeyTwoKeyComp")) {
+        return new EntitySet()
+            .setName("ESKeyTwoKeyComp")
+            .setType(EntityTypeProvider.nameETKeyTwoKeyComp);
+
+      } else if (name.equals("ESInvisible")) {
+        return new EntitySet()
+            .setName("ESInvisible")
+            .setType(EntityTypeProvider.nameETAllPrim);
+
+      } else if (name.equals("ESServerSidePaging")) {
+        return new EntitySet()
+            .setName("ESServerSidePaging")
+            .setType(EntityTypeProvider.nameETServerSidePaging);
+
+      } else if (name.equals("ESAllNullable")) {
+        return new EntitySet()
+            .setName("ESAllNullable")
+            .setType(EntityTypeProvider.nameETAllNullable);
+
+      } else if (name.equals("ESKeyNav")) {
+        return new EntitySet()
+            .setName("ESKeyNav")
+            .setType(EntityTypeProvider.nameETKeyNav);
+
+      } else if (name.equals("ESTwoKeyNav")) {
+        return new EntitySet()
+            .setName("ESTwoKeyNav")
+            .setType(EntityTypeProvider.nameETTwoKeyNav);
+
+      } else if (name.equals("ESBaseTwoKeyNav")) {
+        return new EntitySet()
+            .setName("ESBaseTwoKeyNav")
+            .setType(EntityTypeProvider.nameETBaseTwoKeyNav);
+
+      } else if (name.equals("ESCompMixPrimCollComp")) {
+        return new EntitySet()
+            .setName("ESCompMixPrimCollComp")
+            .setType(EntityTypeProvider.nameETCompMixPrimCollComp);
+
+      } else if (name.equals("ESFourKeyAlias")) {
+        return new EntitySet()
+            .setName("ESFourKeyAlias")
+            .setType(EntityTypeProvider.nameETFourKeyAlias);
+      }
+    }
+
+    return null;
+  }
+
+  public ActionImport getActionImport(final FullQualifiedName entityContainer, final String name) throws ODataException
+  {
+    if (entityContainer.equals(nameContainer)) {
+      if (name.equals("AIRTPrimParam")) {
+        return new ActionImport()
+            .setName("AIRTPrimParam")
+            .setAction(ActionProvider.nameUARTPrimParam);
+
+      } else if (name.equals("AIRTPrimCollParam")) {
+        return new ActionImport()
+            .setName("AIRTPrimCollParam")
+            .setAction(ActionProvider.nameUARTPrimCollParam);
+
+      } else if (name.equals("AIRTCompParam")) {
+        return new ActionImport()
+            .setName("AIRTCompParam")
+            .setAction(ActionProvider.nameUARTCompParam);
+
+      } else if (name.equals("AIRTCompCollParam")) {
+        return new ActionImport()
+            .setName("AIRTCompCollParam")
+            .setAction(ActionProvider.nameUARTCompCollParam);
+
+      } else if (name.equals("AIRTETParam")) {
+        return new ActionImport()
+            .setName("AIRTETParam")
+            .setAction(ActionProvider.nameUARTETParam);
+
+      } else if (name.equals("AIRTETCollAllPrimParam")) {
+        return new ActionImport()
+            .setName("AIRTETCollAllPrimParam")
+            .setAction(ActionProvider.nameUARTESParam);
+      }
+    }
+
+    return null;
+  }
+
+  public FunctionImport getFunctionImport(final FullQualifiedName entityContainer, final String name)
+      throws ODataException {
+
+    if (entityContainer.equals(nameContainer)) {
+      if (name.equals("FINRTInt16")) {
+        return new FunctionImport()
+            .setName("FINRTInt16")
+            .setFunction(FunctionProvider.nameUFNRTInt16)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FINInvisibleRTInt16")) {
+        return new FunctionImport()
+            .setName("FINInvisibleRTInt16")
+            .setFunction(FunctionProvider.nameUFNRTInt16);
+
+      } else if (name.equals("FINInvisible2RTInt16")) {
+        return new FunctionImport()
+            .setName("FINInvisible2RTInt16")
+            .setFunction(FunctionProvider.nameUFNRTInt16);
+
+      } else if (name.equals("FICRTETKeyNav")) {
+        return new FunctionImport()
+            .setName("FICRTETKeyNav")
+            .setFunction(FunctionProvider.nameUFCRTETKeyNav);
+
+      } else if (name.equals("FICRTETTwoKeyNavParam")) {
+        return new FunctionImport()
+            .setName("FICRTETTwoKeyNavParam")
+            .setFunction(FunctionProvider.nameUFCRTETTwoKeyNavParam)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTStringTwoParam")) {
+        return new FunctionImport()
+            .setName("FICRTStringTwoParam")
+            .setFunction(FunctionProvider.nameUFCRTStringTwoParam)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTCollStringTwoParam")) {
+        return new FunctionImport()
+            .setName("FICRTCollStringTwoParam")
+            .setFunction(FunctionProvider.nameUFCRTCollStringTwoParam)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTCTAllPrimTwoParam")) {
+        return new FunctionImport()
+            .setName("FICRTCTAllPrimTwoParam")
+            .setFunction(FunctionProvider.nameUFCRTCTAllPrimTwoParam)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTESMixPrimCollCompTwoParam")) {
+        return new FunctionImport()
+            .setName("FICRTESMixPrimCollCompTwoParam")
+            .setFunction(FunctionProvider.nameUFCRTESMixPrimCollCompTwoParam)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FINRTESMixPrimCollCompTwoParam")) {
+        return new FunctionImport()
+            .setName("FINRTESMixPrimCollCompTwoParam")
+            .setFunction(FunctionProvider.nameUFNRTESMixPrimCollCompTwoParam)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTCollCTTwoPrim")) {
+        return new FunctionImport()
+            .setName("FICRTCollCTTwoPrim")
+            .setFunction(FunctionProvider.nameUFCRTCollCTTwoPrim)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTETMedia")) {
+        return new FunctionImport()
+            .setName("FICRTETMedia")
+            .setFunction(FunctionProvider.nameUFCRTETMedia)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTCTTwoPrimParam")) {
+        return new FunctionImport()
+            .setName("FICRTCTTwoPrimParam")
+            .setFunction(FunctionProvider.nameUFCRTCTTwoPrimParam)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTCTTwoPrim")) {
+        return new FunctionImport()
+            .setName("FICRTCTTwoPrim")
+            .setFunction(FunctionProvider.nameUFCRTCTTwoPrim)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTCollString")) {
+        return new FunctionImport()
+            .setName("FICRTCollString")
+            .setFunction(FunctionProvider.nameUFCRTCollString)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTString")) {
+        return new FunctionImport()
+            .setName("FICRTString")
+            .setFunction(FunctionProvider.nameUFCRTString)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTESTwoKeyNavParam")) {
+        return new FunctionImport()
+            .setName("FICRTESTwoKeyNavParam")
+            .setFunction(FunctionProvider.nameUFCRTESTwoKeyNavParam)
+            .setIncludeInServiceDocument(true);
+
+      } else if (name.equals("FICRTCollCTTwoPrimParam")) {
+        return new FunctionImport()
+            .setName("FICRTCollCTTwoPrimParam")
+            .setFunction(FunctionProvider.nameUFCRTCollCTTwoPrimParam)
+            .setIncludeInServiceDocument(true);
+
+      }
+    }
+
+    return null;
+  }
+
+  public Singleton getSingleton(final FullQualifiedName entityContainer, final String name) throws ODataException {
+    if (entityContainer.equals(nameContainer)) {
+
+      if (name.equals("SI")) {
+        return new Singleton()
+            .setName("SI")
+            .setType(EntityTypeProvider.nameETTwoPrim);
+
+      } else if (name.equals("SINav")) {
+        return new Singleton()
+            .setName("SINav")
+            .setType(EntityTypeProvider.nameETTwoKeyNav)
+            .setNavigationPropertyBindings(Arrays.asList(
+                new NavigationPropertyBinding()
+                    .setPath("NavPropertyETTwoKeyNavMany")
+                    .setTarget(new Target().setTargetName("ESTwoKeyNav"))));
+
+      } else if (name.equals("SIMedia")) {
+        return new Singleton()
+            .setName("SIMedia")
+            .setType(EntityTypeProvider.nameETMedia);
+      }
+    }
+    return null;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/554c795e/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EdmTechProvider.java
----------------------------------------------------------------------
diff --git a/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EdmTechProvider.java b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EdmTechProvider.java
new file mode 100644
index 0000000..93e9c9d
--- /dev/null
+++ b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EdmTechProvider.java
@@ -0,0 +1,147 @@
+/*
+ * 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.server.core.testutil.techprovider;
+
+import java.util.Arrays;
+import java.util.List;
+
+import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.server.api.edm.provider.Action;
+import org.apache.olingo.server.api.edm.provider.ActionImport;
+import org.apache.olingo.server.api.edm.provider.AliasInfo;
+import org.apache.olingo.server.api.edm.provider.ComplexType;
+import org.apache.olingo.server.api.edm.provider.EdmProvider;
+import org.apache.olingo.server.api.edm.provider.EntityContainer;
+import org.apache.olingo.server.api.edm.provider.EntityContainerInfo;
+import org.apache.olingo.server.api.edm.provider.EntitySet;
+import org.apache.olingo.server.api.edm.provider.EntityType;
+import org.apache.olingo.server.api.edm.provider.EnumType;
+import org.apache.olingo.server.api.edm.provider.Function;
+import org.apache.olingo.server.api.edm.provider.FunctionImport;
+import org.apache.olingo.server.api.edm.provider.Schema;
+import org.apache.olingo.server.api.edm.provider.Singleton;
+import org.apache.olingo.server.api.edm.provider.Term;
+import org.apache.olingo.server.api.edm.provider.TypeDefinition;
+
+public class EdmTechProvider extends EdmProvider {
+
+  public static final String nameSpace = "com.sap.odata.test1";
+
+  private final SchemaProvider schemaProvider;
+  private final EntityTypeProvider entityTypeProvider;
+  private final ContainerProvider containerProvider;
+  private final ComplexTypeProvider complexTypeProvider;
+  private final EnumTypeProvider enumTypeProvider;
+  private final ActionProvider actionProvider;
+  private final FunctionProvider functionProvider;
+  private final TypeDefinitionProvider typeDefinitionProvider;
+
+  public EdmTechProvider() {
+    containerProvider = new ContainerProvider();
+    entityTypeProvider = new EntityTypeProvider();
+    complexTypeProvider = new ComplexTypeProvider();
+    enumTypeProvider = new EnumTypeProvider();
+    actionProvider = new ActionProvider();
+    functionProvider = new FunctionProvider();
+    typeDefinitionProvider = new TypeDefinitionProvider();
+    schemaProvider = new SchemaProvider(this);
+  }
+
+  @Override
+  public List<AliasInfo> getAliasInfos() throws ODataException {
+    return Arrays.asList(
+        new AliasInfo().setAlias("Namespace1_Alias").setNamespace(nameSpace)
+        );
+  }
+
+  @Override
+  public EnumType getEnumType(final FullQualifiedName enumTypeName) throws ODataException {
+    return enumTypeProvider.getEnumType(enumTypeName);
+  }
+
+  @Override
+  public TypeDefinition getTypeDefinition(final FullQualifiedName typeDefinitionName) throws ODataException {
+    return typeDefinitionProvider.getTypeDefinition(typeDefinitionName);
+  }
+
+  @Override
+  public EntityType getEntityType(final FullQualifiedName entityTypeName) throws ODataException {
+    return entityTypeProvider.getEntityType(entityTypeName);
+  }
+
+  @Override
+  public ComplexType getComplexType(final FullQualifiedName complexTypeName) throws ODataException {
+    return complexTypeProvider.getComplexType(complexTypeName);
+  }
+
+  @Override
+  public List<Action> getActions(final FullQualifiedName actionName) throws ODataException {
+    return actionProvider.getActions(actionName);
+  }
+
+  @Override
+  public List<Function> getFunctions(final FullQualifiedName functionName) throws ODataException {
+    return functionProvider.getFunctions(functionName);
+  }
+
+  @Override
+  public Term getTerm(final FullQualifiedName termName) throws ODataException {
+    return null;
+  }
+
+  @Override
+  public EntitySet getEntitySet(final FullQualifiedName entityContainer, final String entitySetName)
+      throws ODataException {
+    return containerProvider.getEntitySet(entityContainer, entitySetName);
+  }
+
+  @Override
+  public Singleton getSingleton(final FullQualifiedName entityContainer, final String singletonName)
+      throws ODataException {
+    return containerProvider.getSingleton(entityContainer, singletonName);
+  }
+
+  @Override
+  public ActionImport getActionImport(final FullQualifiedName entityContainer, final String actionImportName)
+      throws ODataException {
+    return containerProvider.getActionImport(entityContainer, actionImportName);
+  }
+
+  @Override
+  public FunctionImport getFunctionImport(final FullQualifiedName entityContainer, final String functionImportName)
+      throws ODataException {
+    return containerProvider.getFunctionImport(entityContainer, functionImportName);
+  }
+
+  @Override
+  public List<Schema> getSchemas() throws ODataException {
+    return schemaProvider.getSchemas();
+  }
+
+  @Override
+  public EntityContainer getEntityContainer() throws ODataException {
+    return containerProvider.getEntityContainer();
+  }
+
+  @Override
+  public EntityContainerInfo getEntityContainerInfo(final FullQualifiedName entityContainerName) throws ODataException {
+    return containerProvider.getEntityContainerInfo(entityContainerName);
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/554c795e/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EntityTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EntityTypeProvider.java b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EntityTypeProvider.java
new file mode 100644
index 0000000..9072234
--- /dev/null
+++ b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EntityTypeProvider.java
@@ -0,0 +1,408 @@
+/*
+ * 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.server.core.testutil.techprovider;
+
+import java.util.Arrays;
+
+import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.server.api.edm.provider.EntityType;
+import org.apache.olingo.server.api.edm.provider.NavigationProperty;
+import org.apache.olingo.server.api.edm.provider.Property;
+import org.apache.olingo.server.api.edm.provider.PropertyRef;
+import org.apache.olingo.server.api.edm.provider.ReferentialConstraint;
+
+public class EntityTypeProvider {
+
+  public static final FullQualifiedName nameETAllKey = new FullQualifiedName(SchemaProvider.nameSpace, "ETAllKey");
+  public static final FullQualifiedName nameETAllNullable = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETAllNullable");
+  public static final FullQualifiedName nameETAllPrim = new FullQualifiedName(SchemaProvider.nameSpace, "ETAllPrim");
+  public static final FullQualifiedName nameETBase = new FullQualifiedName(SchemaProvider.nameSpace, "ETBase");
+  public static final FullQualifiedName nameETBaseTwoKeyNav = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETBaseTwoKeyNav");
+  public static final FullQualifiedName nameETBaseTwoKeyTwoPrim =
+      new FullQualifiedName(SchemaProvider.nameSpace, "ETBaseTwoKeyTwoPrim");
+  public static final FullQualifiedName nameETCollAllPrim = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETCollAllPrim");
+  public static final FullQualifiedName nameETCompAllPrim = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETCompAllPrim");
+  public static final FullQualifiedName nameETCompCollAllPrim = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETCompCollAllPrim");
+  public static final FullQualifiedName nameETCompCollComp = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETCompCollComp");
+  public static final FullQualifiedName nameETCompComp = new FullQualifiedName(SchemaProvider.nameSpace, "ETCompComp");
+  public static final FullQualifiedName nameETCompMixPrimCollComp =
+      new FullQualifiedName(SchemaProvider.nameSpace, "ETCompMixPrimCollComp");
+  public static final FullQualifiedName nameETFourKeyAlias = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETFourKeyAlias");
+  public static final FullQualifiedName nameETKeyNav = new FullQualifiedName(SchemaProvider.nameSpace, "ETKeyNav");
+  public static final FullQualifiedName nameETKeyPrimNav = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETKeyPrimNav");
+  public static final FullQualifiedName nameETKeyTwoKeyComp = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETKeyTwoKeyComp");
+  public static final FullQualifiedName nameETMedia = new FullQualifiedName(SchemaProvider.nameSpace, "ETMedia");
+  public static final FullQualifiedName nameETMixPrimCollComp = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETMixPrimCollComp");
+  public static final FullQualifiedName nameETServerSidePaging =
+      new FullQualifiedName(SchemaProvider.nameSpace, "ETServerSidePaging");
+  public static final FullQualifiedName nameETTwoBase = new FullQualifiedName(SchemaProvider.nameSpace, "ETTwoBase");
+  public static final FullQualifiedName nameETTwoBaseTwoKeyNav =
+      new FullQualifiedName(SchemaProvider.nameSpace, "ETTwoBaseTwoKeyNav");
+  public static final FullQualifiedName nameETTwoBaseTwoKeyTwoPrim =
+      new FullQualifiedName(SchemaProvider.nameSpace, "ETTwoBaseTwoKeyTwoPrim");
+  public static final FullQualifiedName nameETTwoKeyNav =
+      new FullQualifiedName(SchemaProvider.nameSpace, "ETTwoKeyNav");
+  public static final FullQualifiedName nameETTwoKeyTwoPrim = new FullQualifiedName(SchemaProvider.nameSpace,
+      "ETTwoKeyTwoPrim");
+  public static final FullQualifiedName nameETTwoPrim = new FullQualifiedName(SchemaProvider.nameSpace, "ETTwoPrim");
+
+  public EntityType getEntityType(final FullQualifiedName entityTypeName) throws ODataException {
+    if (entityTypeName.equals(nameETAllPrim)) {
+      return new EntityType()
+          .setName("ETAllPrim")
+          .setKey(Arrays.asList(
+              new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(Arrays.asList(
+              PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyString,
+              PropertyProvider.propertyBoolean, PropertyProvider.propertyByte, PropertyProvider.propertySByte,
+              PropertyProvider.propertyInt32, PropertyProvider.propertyInt64,
+              PropertyProvider.propertySingle, PropertyProvider.propertyDouble, PropertyProvider.propertyDecimal,
+              PropertyProvider.propertyBinary, PropertyProvider.propertyDate, PropertyProvider.propertyDateTimeOffset,
+              PropertyProvider.propertyDuration, PropertyProvider.propertyGuid, PropertyProvider.propertyTimeOfDay
+              /* TODO add propertyStream */))
+          .setNavigationProperties(Arrays.asList(PropertyProvider.navPropertyETTwoPrimOne_ETTwoPrim,
+              PropertyProvider.collectionNavPropertyETTwoPrimMany_ETTwoPrim));
+
+    } else if (entityTypeName.equals(nameETCollAllPrim)) {
+      return new EntityType()
+          .setName("ETCollAllPrim")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+
+          .setProperties(
+              Arrays.asList(
+                  PropertyProvider.propertyInt16_NotNullable, PropertyProvider.collPropertyString,
+                  PropertyProvider.collPropertyBoolean, PropertyProvider.collPropertyByte,
+                  PropertyProvider.collPropertySByte, PropertyProvider.collPropertyInt16,
+                  PropertyProvider.collPropertyInt32, PropertyProvider.collPropertyInt64,
+                  PropertyProvider.collPropertySingle, PropertyProvider.collPropertyDouble,
+                  PropertyProvider.collPropertyDecimal, PropertyProvider.collPropertyBinary,
+                  PropertyProvider.collPropertyDate, PropertyProvider.collPropertyDateTimeOffset,
+                  PropertyProvider.collPropertyDuration, PropertyProvider.collPropertyGuid,
+                  PropertyProvider.collPropertyTimeOfDay /* TODO add propertyStream */));
+
+    } else if (entityTypeName.equals(nameETTwoPrim)) {
+      return new EntityType()
+          .setName("ETTwoPrim")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(Arrays.asList(
+              PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyString))
+          .setNavigationProperties(
+              Arrays.asList(PropertyProvider.navPropertyETAllPrimOne_ETAllPrim,
+                  PropertyProvider.collectionNavPropertyETAllPrimMany_ETAllPrim));
+
+    } else if (entityTypeName.equals(nameETMixPrimCollComp)) {
+      return new EntityType()
+          .setName("ETMixPrimCollComp")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(Arrays.asList(
+              PropertyProvider.propertyInt16_NotNullable, PropertyProvider.collPropertyString,
+              PropertyProvider.propertyComplex_CTTwoPrim, PropertyProvider.collPropertyComplex_CTTwoPrim));
+
+    } else if (entityTypeName.equals(nameETTwoKeyTwoPrim)) {
+      return new EntityType()
+          .setName("ETTwoKeyTwoPrim")
+          .setKey(Arrays.asList(
+              new PropertyRef().setPropertyName("PropertyInt16"),
+              new PropertyRef().setPropertyName("PropertyString")))
+          .setProperties(Arrays.asList(
+              PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyString));
+
+    } else if (entityTypeName.equals(nameETBaseTwoKeyTwoPrim)) {
+      return new EntityType()
+          .setName("ETBaseTwoKeyTwoPrim")
+          .setBaseType(nameETTwoKeyTwoPrim);
+
+    } else if (entityTypeName.equals(nameETTwoBaseTwoKeyTwoPrim)) {
+      return new EntityType()
+          .setName("ETTwoBaseTwoKeyTwoPrim")
+          .setBaseType(nameETTwoKeyTwoPrim);
+
+    } else if (entityTypeName.equals(nameETBase)) {
+      return new EntityType()
+          .setName("ETBase")
+          .setBaseType(nameETTwoPrim)
+          .setProperties(Arrays.asList(new Property()
+              .setName("AdditionalPropertyString_5")
+              .setType(PropertyProvider.nameString)));
+
+    } else if (entityTypeName.equals(nameETTwoBase)) {
+      return new EntityType()
+          .setName("ETTwoBase")
+          .setBaseType(nameETBase)
+          .setProperties(Arrays.asList(new Property()
+              .setName("AdditionalPropertyString_6")
+              .setType(PropertyProvider.nameString))
+          );
+
+    } else if (entityTypeName.equals(nameETAllKey)) {
+      return new EntityType()
+          .setName("ETAllKey")
+          .setKey(Arrays.asList(
+              new PropertyRef().setPropertyName("PropertyString"),
+              new PropertyRef().setPropertyName("PropertyBoolean"),
+              new PropertyRef().setPropertyName("PropertyByte"),
+              new PropertyRef().setPropertyName("PropertySByte"),
+              new PropertyRef().setPropertyName("PropertyInt16"),
+              new PropertyRef().setPropertyName("PropertyInt32"),
+              new PropertyRef().setPropertyName("PropertyInt64"),
+              new PropertyRef().setPropertyName("PropertyDecimal"),
+              new PropertyRef().setPropertyName("PropertyDate"),
+              new PropertyRef().setPropertyName("PropertyDateTimeOffset"),
+              new PropertyRef().setPropertyName("PropertyDuration"),
+              new PropertyRef().setPropertyName("PropertyGuid"),
+              new PropertyRef().setPropertyName("PropertyTimeOfDay")))
+          .setProperties(
+              Arrays.asList(
+                  PropertyProvider.propertyString_NotNullable, PropertyProvider.propertyBoolean_NotNullable,
+                  PropertyProvider.propertyByte_NotNullable, PropertyProvider.propertySByte_NotNullable,
+                  PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyInt32_NotNullable,
+                  PropertyProvider.propertyInt64_NotNullable,
+                  PropertyProvider.propertyDecimal_NotNullable, PropertyProvider.propertyDate_NotNullable,
+                  PropertyProvider.propertyDateTimeOffset_NotNullable,
+                  PropertyProvider.propertyDuration_NotNullable, PropertyProvider.propertyGuid_NotNullable,
+                  PropertyProvider.propertyTimeOfDay_NotNullable /* TODO add propertyStream */));
+
+    } else if (entityTypeName.equals(nameETCompAllPrim)) {
+      return new EntityType()
+          .setName("ETCompAllPrim")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(
+              Arrays.asList(PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyComplex_CTAllPrim));
+
+    } else if (entityTypeName.equals(nameETCompCollAllPrim)) {
+      return new EntityType()
+          .setName("ETCompCollAllPrim")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+
+          .setProperties(
+              Arrays.asList(PropertyProvider.propertyInt16_NotNullable,
+                  PropertyProvider.propertyComplex_CTCollAllPrim));
+
+    } else if (entityTypeName.equals(nameETCompComp)) {
+      return new EntityType()
+          .setName("ETCompComp")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(
+              Arrays.asList(PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyComplex_CTCompComp));
+
+    } else if (entityTypeName.equals(nameETCompCollComp)) {
+      return new EntityType()
+          .setName("ETCompCollComp")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(
+              Arrays
+                  .asList(PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyComplex_CTCompCollComp));
+
+    } else if (entityTypeName.equals(nameETMedia)) {
+      return new EntityType()
+          .setName("ETMedia")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(Arrays.asList(PropertyProvider.propertyInt16_NotNullable))
+          .setHasStream(true);
+
+    } else if (entityTypeName.equals(nameETKeyTwoKeyComp)) {
+      return new EntityType()
+          .setName("ETKeyTwoKeyComp")
+          .setKey(Arrays.asList(
+              new PropertyRef()
+                  .setPropertyName("PropertyInt16"),
+              new PropertyRef()
+                  .setPropertyName("PropertyComplex/PropertyInt16")
+                  .setAlias("KeyAlias1"),
+              new PropertyRef()
+                  .setPropertyName("PropertyComplex/PropertyString")
+                  .setAlias("KeyAlias2"),
+              new PropertyRef()
+                  .setPropertyName("PropertyComplexComplex/PropertyComplex/PropertyString")
+                  .setAlias("KeyAlias3")))
+          .setProperties(
+              Arrays.asList(
+                  PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyComplex_CTTwoPrim,
+                  PropertyProvider.propertyComplexComplex_CTCompComp));
+
+    } else if (entityTypeName.equals(nameETServerSidePaging)) {
+      return new EntityType()
+          .setName(nameETServerSidePaging.getName())
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(Arrays.asList(PropertyProvider.propertyInt16_NotNullable,
+              PropertyProvider.propertyString_NotNullable));
+
+    } else if (entityTypeName.equals(nameETAllNullable)) {
+      return new EntityType()
+          .setName("ETAllNullable")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyKey")))
+          .setProperties(
+              Arrays.asList(
+                  new Property()
+                      .setName("PropertyKey").setType(PropertyProvider.nameInt16).setNullable(false),
+                  PropertyProvider.propertyInt16_ExplicitNullable, PropertyProvider.propertyString_ExplicitNullable,
+                  PropertyProvider.propertyBoolean_ExplicitNullable, PropertyProvider.propertyByte_ExplicitNullable,
+                  PropertyProvider.propertySByte_ExplicitNullable, PropertyProvider.propertyInt32_ExplicitNullable,
+                  PropertyProvider.propertyInt64_ExplicitNullable, PropertyProvider.propertySingle_ExplicitNullable,
+                  PropertyProvider.propertyDouble_ExplicitNullable, PropertyProvider.propertyDecimal_ExplicitNullable,
+                  PropertyProvider.propertyBinary_ExplicitNullable, PropertyProvider.propertyDate_ExplicitNullable,
+                  PropertyProvider.propertyDateTimeOffset_ExplicitNullable,
+                  PropertyProvider.propertyDuration_ExplicitNullable, PropertyProvider.propertyGuid_ExplicitNullable,
+                  PropertyProvider.propertyTimeOfDay_ExplicitNullable /* TODO add propertyStream */,
+                  PropertyProvider.collPropertyString_ExplicitNullable,
+                  PropertyProvider.collPropertyBoolean_ExplicitNullable,
+                  PropertyProvider.collPropertyByte_ExplicitNullable,
+                  PropertyProvider.collPropertySByte_ExplicitNullable,
+                  PropertyProvider.collPropertyInt16_ExplicitNullable,
+                  PropertyProvider.collPropertyInt32_ExplicitNullable,
+                  PropertyProvider.collPropertyInt64_ExplicitNullable,
+                  PropertyProvider.collPropertySingle_ExplicitNullable,
+                  PropertyProvider.collPropertyDouble_ExplicitNullable,
+                  PropertyProvider.collPropertyDecimal_ExplicitNullable,
+                  PropertyProvider.collPropertyBinary_ExplicitNullable,
+                  PropertyProvider.collPropertyDate_ExplicitNullable,
+                  PropertyProvider.collPropertyDateTimeOffset_ExplicitNullable,
+                  PropertyProvider.collPropertyDuration_ExplicitNullable,
+                  PropertyProvider.collPropertyGuid_ExplicitNullable,
+                  PropertyProvider.collPropertyTimeOfDay_ExplicitNullable /* TODO add propertyStream */));
+
+    } else if (entityTypeName.equals(nameETKeyNav)) {
+      return new EntityType()
+          .setName("ETKeyNav")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(
+              Arrays.asList(
+                  PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyString_NotNullable,
+                  PropertyProvider.propertyComplex_CTNavFiveProp,
+                  PropertyProvider.propertyComplexAllPrim_CTAllPrim, PropertyProvider.propertyComplexTwoPrim_CTTwoPrim,
+                  PropertyProvider.collPropertyString, PropertyProvider.collPropertyInt16,
+                  PropertyProvider.collPropertyComplex_CTPrimComp,
+                  new Property()
+                      .setName("PropertyComplexComplex").setType(ComplexTypeProvider.nameCTCompNav)
+                  ))
+          .setNavigationProperties(
+              Arrays.asList(
+                  PropertyProvider.navPropertyETTwoKeyNavOne_ETTwoKeyNav_NotNullable,
+                  PropertyProvider.collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav,
+                  PropertyProvider.navPropertyETKeyNavOne_ETKeyNav,
+                  PropertyProvider.collectionNavPropertyETKeyNavMany_ETKeyNav,
+                  PropertyProvider.navPropertyETMediaOne_ETMedia,
+                  PropertyProvider.collectionNavPropertyETMediaMany_ETMedia
+                  ));
+    } else if (entityTypeName.equals(nameETKeyPrimNav)) {
+      return new EntityType()
+          .setName("ETKeyPrimNav")
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(Arrays.asList(
+              PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyString_ExplicitNullable))
+          .setNavigationProperties(
+              Arrays.asList(
+                  PropertyProvider.navPropertyETKeyPrimNavOne_ETKeyPrimNav));
+
+    } else if (entityTypeName.equals(nameETTwoKeyNav)) {
+      return new EntityType()
+          .setName("ETTwoKeyNav")
+          .setKey(Arrays.asList(
+              new PropertyRef().setPropertyName("PropertyInt16"),
+              new PropertyRef().setPropertyName("PropertyString")))
+          .setProperties(
+              Arrays.asList(
+                  PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyString_NotNullable,
+                  PropertyProvider.propertyComplex_CTPrimComp_NotNullable,
+                  new Property().setName("PropertyComplexNav").setType(ComplexTypeProvider.nameCTBasePrimCompNav)
+                      .setNullable(false),
+                  PropertyProvider.propertyComplexEnum_CTPrimEnum_NotNullable,
+                  PropertyProvider.collPropertyComplex_CTPrimComp,
+                  new Property().setName("CollPropertyComplexNav").setType(ComplexTypeProvider.nameCTNavFiveProp)
+                      .setCollection(true),
+                  PropertyProvider.collPropertyString, PropertyProvider.propertyComplexTwoPrim_CTTwoPrim,
+                  PropertyProvider.propertyEnumString_ENString
+                  ))
+          .setNavigationProperties(Arrays.asList(
+              new NavigationProperty()
+                  .setName("NavPropertyETKeyNavOne")
+                  .setType(nameETKeyNav)
+                  .setReferentialConstraints(Arrays.asList(
+                      new ReferentialConstraint()
+                          .setProperty("PropertyInt16")
+                          .setReferencedProperty("PropertyInt16"))),
+              PropertyProvider.collectionNavPropertyETKeyNavMany_ETKeyNav,
+              PropertyProvider.navPropertyETTwoKeyNavOne_ETTwoKeyNav,
+              PropertyProvider.collectionNavPropertyETTwoKeyNavMany_ETTwoKeyNav));
+
+    } else if (entityTypeName.equals(nameETBaseTwoKeyNav)) {
+      return new EntityType()
+          .setName("ETBaseTwoKeyNav")
+          .setBaseType(nameETTwoKeyNav)
+          .setProperties(Arrays.asList(PropertyProvider.propertyDate_ExplicitNullable))
+          .setNavigationProperties(Arrays.asList(
+              new NavigationProperty()
+                  .setName("NavPropertyETBaseTwoKeyNavOne")
+                  .setType(nameETBaseTwoKeyNav),
+              new NavigationProperty()
+                  .setName("NavPropertyETTwoBaseTwoKeyNavOne")
+                  .setType(nameETTwoBaseTwoKeyNav)));
+
+    } else if (entityTypeName.equals(nameETTwoBaseTwoKeyNav)) {
+      return new EntityType()
+          .setName("ETTwoBaseTwoKeyNav")
+          .setBaseType(nameETBaseTwoKeyNav)
+          .setKey(Arrays.asList(new PropertyRef().setPropertyName("PropertyInt16")))
+          .setProperties(Arrays.asList(PropertyProvider.propertyGuid_ExplicitNullable))
+          .setNavigationProperties(Arrays.asList(
+              new NavigationProperty()
+                  .setName("NavPropertyETBaseTwoKeyNavMany")
+                  .setType(nameETBaseTwoKeyNav)
+                  .setCollection(true)
+              ));
+
+    } else if (entityTypeName.equals(nameETFourKeyAlias)) {
+      return new EntityType()
+          .setName("ETFourKeyAlias")
+          .setKey(
+              Arrays.asList(
+                  new PropertyRef().setPropertyName("PropertyInt16"),
+                  new PropertyRef().setPath("PropertyComplex/PropertyInt16").setPropertyName("PropertyInt16").setAlias(
+                      "KeyAlias1"),
+                  new PropertyRef().setPath("PropertyComplex/PropertyString").setPropertyName("PropertyString")
+                      .setAlias("KeyAlias2"),
+                  new PropertyRef().setPath("PropertyComplexComplex/PropertyComplex/PropertyString").setPropertyName(
+                      "PropertyString").setAlias("KeyAlias3"))).setProperties(
+              Arrays.asList(PropertyProvider.propertyInt16_NotNullable, PropertyProvider.propertyComplex_CTTwoPrim,
+                  PropertyProvider.propertyComplexComplex_CTCompComp));
+    } else if (entityTypeName.equals(nameETCompMixPrimCollComp)) {
+      return new EntityType()
+          .setName("ETCompMixPrimCollComp")
+          .setKey(Arrays.asList(
+              new PropertyRef()
+                  .setPropertyName("PropertyInt16")))
+          .setProperties(
+              Arrays.asList(PropertyProvider.propertyInt16_NotNullable,
+                  PropertyProvider.propertyMixedPrimCollComp_CTMixPrimCollComp));
+    }
+
+    return null;
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/554c795e/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EnumTypeProvider.java
----------------------------------------------------------------------
diff --git a/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EnumTypeProvider.java b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EnumTypeProvider.java
new file mode 100644
index 0000000..94ea6ea
--- /dev/null
+++ b/lib/ref/src/main/java/org/apache/olingo/server/core/testutil/techprovider/EnumTypeProvider.java
@@ -0,0 +1,47 @@
+/*
+ * 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.server.core.testutil.techprovider;
+
+import java.util.Arrays;
+
+import org.apache.olingo.commons.api.ODataException;
+import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
+import org.apache.olingo.commons.api.edm.FullQualifiedName;
+import org.apache.olingo.server.api.edm.provider.EnumMember;
+import org.apache.olingo.server.api.edm.provider.EnumType;
+
+public class EnumTypeProvider {
+
+  public static final FullQualifiedName nameENString = new FullQualifiedName(SchemaProvider.nameSpace, "ENString");
+
+  public EnumType getEnumType(final FullQualifiedName enumTypeName) throws ODataException {
+    if (enumTypeName.equals(nameENString)) {
+      return new EnumType()
+          .setName("ENString")
+          .setFlags(true)
+          .setUnderlyingType(EdmPrimitiveTypeKind.Int16.getFullQualifiedName())
+          .setMembers(Arrays.asList(
+              new EnumMember().setName("String1").setValue("1"),
+              new EnumMember().setName("String2").setValue("2"),
+              new EnumMember().setName("String3").setValue("3")));
+    }
+
+    return null;
+  }
+}