You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2014/04/02 09:33:21 UTC

[02/17] [OLINGO-168] metadata serialization

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmMemberImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmMemberImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmMemberImplTest.java
index 8653edf..f0383f6 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmMemberImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmMemberImplTest.java
@@ -1,30 +1,28 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * 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.edm.provider;
 
-import org.apache.olingo.commons.core.edm.EdmMemberImpl;
-
 import static org.junit.Assert.assertEquals;
 import static org.mockito.Mockito.mock;
 
+import org.apache.olingo.commons.core.edm.EdmMemberImpl;
 import org.apache.olingo.server.api.edm.provider.EnumMember;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmMemberImplTest {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNamedImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNamedImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNamedImplTest.java
index 164264e..946d660 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNamedImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNamedImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImplTest.java
index 30c83e9..dd3a8b5 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmNavigationPropertyImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -40,8 +40,6 @@ 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.PropertyRef;
 import org.apache.olingo.server.api.edm.provider.ReferentialConstraint;
-import org.apache.olingo.server.core.edm.provider.EdmNavigationPropertyImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmNavigationPropertyImplTest {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmParameterImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmParameterImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmParameterImplTest.java
index d446145..b1fcd62 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmParameterImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmParameterImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -36,8 +36,6 @@ import org.apache.olingo.server.api.edm.provider.EdmProvider;
 import org.apache.olingo.server.api.edm.provider.EnumType;
 import org.apache.olingo.server.api.edm.provider.Parameter;
 import org.apache.olingo.server.api.edm.provider.TypeDefinition;
-import org.apache.olingo.server.core.edm.provider.EdmParameterImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmParameterImplTest {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImplTest.java
index fca16d8..678b87c 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmPropertyImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -38,8 +38,6 @@ import org.apache.olingo.server.api.edm.provider.EdmProvider;
 import org.apache.olingo.server.api.edm.provider.EnumType;
 import org.apache.olingo.server.api.edm.provider.Property;
 import org.apache.olingo.server.api.edm.provider.TypeDefinition;
-import org.apache.olingo.server.core.edm.provider.EdmPropertyImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Test;
 
 public class EdmPropertyImplTest {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplOverloadingTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplOverloadingTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplOverloadingTest.java
index 7a7b43d..1ac09ce 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplOverloadingTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplOverloadingTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -39,7 +39,6 @@ import org.apache.olingo.server.api.edm.provider.Action;
 import org.apache.olingo.server.api.edm.provider.EdmProvider;
 import org.apache.olingo.server.api.edm.provider.Function;
 import org.apache.olingo.server.api.edm.provider.Parameter;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
index 4f5ed85..66a3f99 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmProviderImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -47,7 +47,6 @@ 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.PropertyRef;
 import org.apache.olingo.server.api.edm.provider.TypeDefinition;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.junit.Before;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImplTest.java
index 5cb9a67..3aecc7b 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmReturnTypeImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -35,8 +35,6 @@ import org.apache.olingo.commons.api.edm.EdmTypeDefinition;
 import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeKind;
 import org.apache.olingo.server.api.edm.provider.ReturnType;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
-import org.apache.olingo.server.core.edm.provider.EdmReturnTypeImpl;
 import org.junit.Test;
 
 public class EdmReturnTypeImplTest {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
index 2342eae..f227796 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSchemaImplTest.java
@@ -73,7 +73,7 @@ public class EdmSchemaImplTest {
     schema = edm.getSchemas().get(0);
 
   }
-  
+
   @Test
   public void initialSchemaTest() {
     EdmProvider provider = mock(EdmProvider.class);
@@ -85,26 +85,26 @@ public class EdmSchemaImplTest {
   public void emptySchemaTest() throws Exception {
     ArrayList<Schema> schemas = new ArrayList<Schema>();
     Schema providerSchema = new Schema();
-    schemas.add(providerSchema );
+    schemas.add(providerSchema);
     EdmProvider provider = mock(EdmProvider.class);
     when(provider.getSchemas()).thenReturn(schemas);
     edm = new EdmProviderImpl(provider);
     edm.getSchemas();
   }
-  
+
   @Test
   public void basicGetters() {
     assertEquals("namespace", schema.getNamespace());
     assertEquals("alias", schema.getAlias());
   }
-  
+
   @Test
-  public void getTypeDefinitions(){
+  public void getTypeDefinitions() {
     List<EdmTypeDefinition> typeDefinitions = schema.getTypeDefinitions();
     assertNotNull(typeDefinitions);
     assertEquals(2, typeDefinitions.size());
-    
-    for(EdmTypeDefinition def : typeDefinitions){
+
+    for (EdmTypeDefinition def : typeDefinitions) {
       assertTrue(def == edm.getTypeDefinition(new FullQualifiedName("namespace", def.getName())));
     }
   }
@@ -197,70 +197,84 @@ public class EdmSchemaImplTest {
     for (EdmFunctionImport obj : functionImports) {
       assertNotNull(obj.getFunctionFqn());
     }
-    
+
     assertTrue(container == edm.getEntityContainer(new FullQualifiedName(schema.getNamespace(), container.getName())));
     assertTrue(container == edm.getEntityContainer(null));
   }
 
   private class LocalProvider extends EdmProvider {
 
+    @Override
     public EnumType getEnumType(final FullQualifiedName enumTypeName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public TypeDefinition getTypeDefinition(final FullQualifiedName typeDefinitionName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public EntityType getEntityType(final FullQualifiedName entityTypeName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public ComplexType getComplexType(final FullQualifiedName complexTypeName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public List<Action> getActions(final FullQualifiedName actionName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public List<Function> getFunctions(final FullQualifiedName functionName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public Term getTerm(final FullQualifiedName termName) throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public EntitySet getEntitySet(final FullQualifiedName entityContainer, final String entitySetName)
         throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public Singleton getSingleton(final FullQualifiedName entityContainer, final String singletonName)
         throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public ActionImport getActionImport(final FullQualifiedName entityContainer, final String actionImportName)
         throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public FunctionImport getFunctionImport(final FullQualifiedName entityContainer, final String functionImportName)
         throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public EntityContainerInfo getEntityContainerInfo(final FullQualifiedName entityContainerName)
         throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public List<AliasInfo> getAliasInfos() throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }
 
+    @Override
     public List<Schema> getSchemas() throws ODataException {
       Schema providerSchema = new Schema();
       providerSchema.setNamespace("namespace");
@@ -300,7 +314,7 @@ public class EdmSchemaImplTest {
       typeDefinitions.add(new TypeDefinition().setName("typeDefinition1"));
       typeDefinitions.add(new TypeDefinition().setName("typeDefinition2"));
       providerSchema.setTypeDefinitions(typeDefinitions);
-      
+
       List<EnumType> enumTypes = new ArrayList<EnumType>();
       enumTypes.add(new EnumType().setName("enumType1"));
       enumTypes.add(new EnumType().setName("enumType2"));
@@ -330,6 +344,7 @@ public class EdmSchemaImplTest {
       return schemas;
     }
 
+    @Override
     public EntityContainer getEntityContainer() throws ODataException {
       throw new RuntimeException("Provider must not be called in the schema case");
     }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImplTest.java
index 431c458..16bc0fb 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmServiceMetadataImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -39,7 +39,6 @@ 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.Schema;
 import org.apache.olingo.server.api.edm.provider.Singleton;
-import org.apache.olingo.server.core.edm.provider.EdmServiceMetadataImpl;
 import org.junit.Test;
 
 public class EdmServiceMetadataImplTest {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImplTest.java
index ab13215..10717d5 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmSingletonImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -38,9 +38,6 @@ import org.apache.olingo.server.api.edm.provider.EntityType;
 import org.apache.olingo.server.api.edm.provider.NavigationPropertyBinding;
 import org.apache.olingo.server.api.edm.provider.PropertyRef;
 import org.apache.olingo.server.api.edm.provider.Singleton;
-import org.apache.olingo.server.core.edm.provider.EdmEntityContainerImpl;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
-import org.apache.olingo.server.core.edm.provider.EdmSingletonImpl;
 import org.junit.Test;
 
 public class EdmSingletonImplTest {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeDefinitionImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeDefinitionImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeDefinitionImplTest.java
index 9b57bdb..322a044 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeDefinitionImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeDefinitionImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -29,8 +29,6 @@ import org.apache.olingo.commons.api.edm.FullQualifiedName;
 import org.apache.olingo.commons.api.edm.constants.EdmTypeKind;
 import org.apache.olingo.commons.core.edm.primitivetype.EdmPrimitiveTypeKind;
 import org.apache.olingo.server.api.edm.provider.TypeDefinition;
-import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
-import org.apache.olingo.server.core.edm.provider.EdmTypeDefinitionImpl;
 import org.junit.Test;
 
 public class EdmTypeDefinitionImplTest {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeImplTest.java
index d932b1e..3da16bd 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/edm/provider/EdmTypeImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentTest.java
new file mode 100644
index 0000000..4bf5a99
--- /dev/null
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/json/ServiceDocumentTest.java
@@ -0,0 +1,133 @@
+/*
+ * 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.serializer.json;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.commons.api.edm.EdmEntityContainer;
+import org.apache.olingo.commons.api.edm.EdmEntitySet;
+import org.apache.olingo.commons.api.edm.EdmFunctionImport;
+import org.apache.olingo.commons.api.edm.EdmSingleton;
+import org.apache.olingo.server.api.ODataServer;
+import org.apache.olingo.server.api.serializer.ODataFormat;
+import org.apache.olingo.server.api.serializer.ODataSerializer;
+import org.apache.olingo.server.core.testutil.StringUtils;
+import org.junit.Before;
+import org.junit.Test;
+
+public class ServiceDocumentTest {
+
+  private Edm edm;
+
+  @Before
+  public void before() {
+
+    EdmEntitySet edmEntitySet1 = mock(EdmEntitySet.class);
+    when(edmEntitySet1.getName()).thenReturn("entitySetName1");
+    when(edmEntitySet1.isIncludeInServiceDocument()).thenReturn(true);
+
+    EdmEntitySet edmEntitySet2 = mock(EdmEntitySet.class);
+    when(edmEntitySet2.getName()).thenReturn("entitySetName2");
+    when(edmEntitySet2.isIncludeInServiceDocument()).thenReturn(true);
+
+    EdmEntitySet edmEntitySet3 = mock(EdmEntitySet.class);
+    when(edmEntitySet3.getName()).thenReturn("entitySetName3");
+    when(edmEntitySet3.isIncludeInServiceDocument()).thenReturn(false);
+
+    List<EdmEntitySet> entitySets = new ArrayList<EdmEntitySet>();
+    entitySets.add(edmEntitySet1);
+    entitySets.add(edmEntitySet2);
+    entitySets.add(edmEntitySet3);
+
+    EdmFunctionImport functionImport1 = mock(EdmFunctionImport.class);
+    when(functionImport1.getName()).thenReturn("functionImport1");
+    when(functionImport1.isIncludeInServiceDocument()).thenReturn(true);
+
+    EdmFunctionImport functionImport2 = mock(EdmFunctionImport.class);
+    when(functionImport2.getName()).thenReturn("functionImport2");
+    when(functionImport2.isIncludeInServiceDocument()).thenReturn(true);
+
+    EdmFunctionImport functionImport3 = mock(EdmFunctionImport.class);
+    when(functionImport3.getName()).thenReturn("functionImport3");
+    when(functionImport3.isIncludeInServiceDocument()).thenReturn(false);
+
+    List<EdmFunctionImport> functionImports = new ArrayList<EdmFunctionImport>();
+    functionImports.add(functionImport1);
+    functionImports.add(functionImport2);
+    functionImports.add(functionImport3);
+
+    EdmSingleton singleton1 = mock(EdmSingleton.class);
+    when(singleton1.getName()).thenReturn("singleton1");
+
+    EdmSingleton singleton2 = mock(EdmSingleton.class);
+    when(singleton2.getName()).thenReturn("singleton2");
+
+    EdmSingleton singleton3 = mock(EdmSingleton.class);
+    when(singleton3.getName()).thenReturn("singleton3");
+
+    List<EdmSingleton> singletons = new ArrayList<EdmSingleton>();
+    singletons.add(singleton1);
+    singletons.add(singleton2);
+    singletons.add(singleton3);
+
+    EdmEntityContainer edmEntityContainer = mock(EdmEntityContainer.class);
+    when(edmEntityContainer.getEntitySets()).thenReturn(entitySets);
+    when(edmEntityContainer.getFunctionImports()).thenReturn(functionImports);
+    when(edmEntityContainer.getSingletons()).thenReturn(singletons);
+
+    edm = mock(Edm.class);
+    when(edm.getEntityContainer(null)).thenReturn(edmEntityContainer);
+  }
+
+  @Test
+  public void writeServiceDocumentJson() throws Exception {
+    String serviceRoot = "http://localhost:8080/odata.svc";
+
+    ODataServer server = ODataServer.newInstance();
+    assertNotNull(server);
+
+    ODataSerializer serializer = server.getSerializer(ODataFormat.JSON);
+    assertNotNull(serializer);
+
+    InputStream result = serializer.serviceDocument(edm, serviceRoot);
+    assertNotNull(result);
+    String jsonString = StringUtils.inputStreamToString(result, true);
+
+    assertTrue(jsonString.contains("entitySetName1"));
+    assertTrue(jsonString.contains("entitySetName2"));
+    assertFalse(jsonString.contains("entitySetName3"));
+
+    assertTrue(jsonString.contains("functionImport1"));
+    assertTrue(jsonString.contains("functionImport2"));
+    assertFalse(jsonString.contains("functionImport3"));
+
+    assertTrue(jsonString.contains("singleton1"));
+    assertTrue(jsonString.contains("singleton2"));
+    assertTrue(jsonString.contains("singleton3"));
+  }
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
new file mode 100644
index 0000000..0a8cd0e
--- /dev/null
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/serializer/xml/MetadataDocumentTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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.serializer.xml;
+
+import static org.mockito.Mockito.mock;
+
+import java.io.InputStream;
+
+import org.apache.olingo.commons.api.ODataRuntimeException;
+import org.apache.olingo.commons.api.edm.Edm;
+import org.apache.olingo.server.api.ODataServer;
+import org.apache.olingo.server.api.serializer.ODataFormat;
+import org.apache.olingo.server.api.serializer.ODataSerializer;
+import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
+import org.apache.olingo.server.core.testutil.EdmTechProvider;
+import org.apache.olingo.server.core.testutil.StringUtils;
+import org.junit.Test;
+
+public class MetadataDocumentTest {
+
+  @Test(expected = ODataRuntimeException.class)
+  public void metadataOnJsonResultsInException() {
+    ODataSerializer serializer = ODataServer.newInstance().getSerializer(ODataFormat.JSON);
+    serializer.metadataDocument(mock(Edm.class));
+  }
+
+  @Test
+  public void writeMetadataWithMockedEdm() {
+    ODataSerializer serializer = ODataServer.newInstance().getSerializer(ODataFormat.XML);
+    Edm edm = mock(Edm.class);
+    serializer.metadataDocument(edm);
+  }
+
+  @Test
+  public void writeMetadataWithTechnicalScenario() {
+    ODataSerializer serializer = ODataServer.newInstance().getSerializer(ODataFormat.XML);
+    EdmProviderImpl edm = new EdmProviderImpl(new EdmTechProvider());
+    InputStream metadata = serializer.metadataDocument(edm);
+    System.out.println(StringUtils.inputStreamToString(metadata, true));
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechProvider.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechProvider.java
index 741ca3c..bbfd107 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechProvider.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechProvider.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -31,6 +31,7 @@ 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;
@@ -45,6 +46,7 @@ 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;
 import org.apache.olingo.server.api.edm.provider.ReturnType;
+import org.apache.olingo.server.api.edm.provider.Schema;
 import org.apache.olingo.server.api.edm.provider.Singleton;
 
 public class EdmTechProvider extends EdmProvider {
@@ -463,7 +465,8 @@ public class EdmTechProvider extends EdmProvider {
 
   Property propertyInt16_NotNullable = new Property()
       .setName("PropertyInt16")
-      .setType(nameInt16);
+      .setType(nameInt16)
+      .setNullable(false);
   Property propertyInt32 = new Property()
       .setName("PropertyInt32")
       .setType(nameInt32);
@@ -497,6 +500,212 @@ public class EdmTechProvider extends EdmProvider {
       .setType(nameTimeOfDay);
 
   @Override
+  public EntityContainer getEntityContainer() throws ODataException {
+    // TODO Auto-generated method stub
+    return super.getEntityContainer();
+  }
+
+  @Override
+  public List<Schema> getSchemas() throws ODataException {
+    List<Schema> schemas = new ArrayList<Schema>();
+    Schema schema = new Schema();
+    schema.setNamespace("com.sap.odata.test1");
+    schema.setAlias("Namespace1_Alias");
+    schemas.add(schema);
+    // EnumTypes
+    List<EnumType> enumTypes = new ArrayList<EnumType>();
+    schema.setEnumTypes(enumTypes);
+    enumTypes.add(getEnumType(nameENString));
+    // EntityTypes
+    List<EntityType> entityTypes = new ArrayList<EntityType>();
+    schema.setEntityTypes(entityTypes);
+    entityTypes.add(getEntityType(nameETAllPrim));
+    entityTypes.add(getEntityType(nameETCollAllPrim));
+    entityTypes.add(getEntityType(nameETTwoPrim));
+    entityTypes.add(getEntityType(nameETMixPrimCollComp));
+    entityTypes.add(getEntityType(nameETTwoKeyTwoPrim));
+    entityTypes.add(getEntityType(nameETBase));
+    entityTypes.add(getEntityType(nameETTwoBase));
+    entityTypes.add(getEntityType(nameETAllKey));
+    entityTypes.add(getEntityType(nameETCompAllPrim));
+    entityTypes.add(getEntityType(nameETCompCollAllPrim));
+    entityTypes.add(getEntityType(nameETCompComp));
+    entityTypes.add(getEntityType(nameETCompCollComp));
+    entityTypes.add(getEntityType(nameETMedia));
+    entityTypes.add(getEntityType(nameETFourKeyAlias));
+    entityTypes.add(getEntityType(nameETServerSidePaging));
+    entityTypes.add(getEntityType(nameETAllNullable));
+    entityTypes.add(getEntityType(nameETKeyNav));
+    entityTypes.add(getEntityType(nameETTwoKeyNav));
+    entityTypes.add(getEntityType(nameETBaseTwoKeyNav));
+    entityTypes.add(getEntityType(nameETTwoBaseTwoKeyNav));
+    entityTypes.add(getEntityType(nameETCompMixPrimCollComp));
+    entityTypes.add(getEntityType(nameETKeyPrimNav));
+
+    // ComplexTypes
+    List<ComplexType> complexType = new ArrayList<ComplexType>();
+    schema.setComplexTypes(complexType);
+    complexType.add(getComplexType(nameCTPrim));
+    complexType.add(getComplexType(nameCTAllPrim));
+    complexType.add(getComplexType(nameCTCollAllPrim));
+    complexType.add(getComplexType(nameCTTwoPrim));
+    complexType.add(getComplexType(nameCTMixPrimCollComp));
+    complexType.add(getComplexType(nameCTBase));
+    complexType.add(getComplexType(nameCTTwoBase));
+    complexType.add(getComplexType(nameCTCompComp));
+    complexType.add(getComplexType(nameCTCompCollComp));
+    complexType.add(getComplexType(nameCTPrimComp));
+    complexType.add(getComplexType(nameCTNavFiveProp));
+    complexType.add(getComplexType(nameCTPrimEnum));
+    complexType.add(getComplexType(nameCTBasePrimCompNav));
+    complexType.add(getComplexType(nameCTTwoBasePrimCompNav));
+    complexType.add(getComplexType(nameCTCompNav));
+
+    // TypeDefinitions
+
+    // Actions
+    List<Action> actions = new ArrayList<Action>();
+    schema.setActions(actions);
+    actions.addAll(getActions(nameUARTPrimParam));
+    actions.addAll(getActions(nameUARTPrimCollParam));
+    actions.addAll(getActions(nameUARTCompParam));
+    actions.addAll(getActions(nameUARTCompCollParam));
+    actions.addAll(getActions(nameUARTETParam));
+    actions.addAll(getActions(nameUARTETCollAllPrimParam));
+    actions.addAll(getActions(nameBAETTwoKeyNavRTETTwoKeyNav));
+    actions.addAll(getActions(nameBAESAllPrimRTETAllPrim));
+    actions.addAll(getActions(nameBAESTwoKeyNavRTESTwoKeyNav));
+    actions.addAll(getActions(nameBAETBaseTwoKeyNavRTETBaseTwoKeyNav));
+    actions.addAll(getActions(nameBAETTwoBaseTwoKeyNavRTETBaseTwoKeyNav));
+
+    // Functions
+    List<Function> functions = new ArrayList<Function>();
+    schema.setFunctions(functions);
+
+    functions.addAll(getFunctions(nameUFNRTInt16));
+    functions.addAll(getFunctions(nameUFCRTETKeyNav));
+    functions.addAll(getFunctions(nameUFCRTETTwoKeyNavParam));
+    functions.addAll(getFunctions(nameUFCRTETTwoKeyNavParamCTTwoPrim));
+    functions.addAll(getFunctions(nameUFCRTStringTwoParam));
+    functions.addAll(getFunctions(nameUFCRTESTwoKeyNavParam));
+    // TODO: check why it exists twice
+    functions.addAll(getFunctions(nameUFCRTString));
+    functions.addAll(getFunctions(nameUFCRTCollStringTwoParam));
+    functions.addAll(getFunctions(nameUFCRTCollString));
+    functions.addAll(getFunctions(nameUFCRTCTAllPrimTwoParam));
+    functions.addAll(getFunctions(nameUFCRTCTTwoPrimParam));
+    functions.addAll(getFunctions(nameUFCRTCollCTTwoPrimParam));
+    functions.addAll(getFunctions(nameUFCRTCTTwoPrim));
+    functions.addAll(getFunctions(nameUFCRTCollCTTwoPrim));
+    functions.addAll(getFunctions(nameUFCRTETMedia));
+    functions.addAll(getFunctions(nameUFNRTESMixPrimCollCompTwoParam));
+    functions.addAll(getFunctions(nameUFCRTETAllPrimTwoParam));
+    functions.addAll(getFunctions(nameUFCRTESMixPrimCollCompTwoParam));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCStringRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCETBaseTwoKeyNavRTETTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCESBaseTwoKeyNavRTESBaseTwoKey));
+    functions.addAll(getFunctions(nameBFCESAllPrimRTCTAllPrim));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTCTTwoPrim));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTCollCTTwoPrim));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTString));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTCollString));
+    functions.addAll(getFunctions(nameBFCETTwoKeyNavRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCETBaseTwoKeyNavRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCSINavRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCETBaseTwoKeyNavRTESBaseTwoKey));
+    functions.addAll(getFunctions(nameBFCCollStringRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCCTPrimCompRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCCTPrimCompRTESBaseTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCCollCTPrimCompRTESAllPrim));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCESKeyNavRTETKeyNav));
+    functions.addAll(getFunctions(nameBFCETKeyNavRTETKeyNav));
+    functions.addAll(getFunctions(nameBFESTwoKeyNavRTESTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCETTwoKeyNavRTETTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCETTwoKeyNavRTCTTwoPrim));
+    functions.addAll(getFunctions(nameBFCESTwoKeyNavRTStringParam));
+    functions.addAll(getFunctions(nameBFCESKeyNavRTETKeyNavParam));
+    functions.addAll(getFunctions(nameBFCCTPrimCompRTETTwoKeyNavParam));
+    functions.addAll(getFunctions(nameBAETTwoKeyNavRTETTwoKeyNav));
+    functions.addAll(getFunctions(nameBFCCTPrimCompRTESTwoKeyNavParam));
+
+    // EntityContainer
+    EntityContainer container = new EntityContainer();
+    schema.setEntityContainer(container);
+    container.setName(nameContainer.getName());
+
+    // EntitySets
+    List<EntitySet> entitySets = new ArrayList<EntitySet>();
+    container.setEntitySets(entitySets);
+    entitySets.add(getEntitySet(nameContainer, "ESAllPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESCollAllPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESTwoPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESMixPrimCollComp"));
+    entitySets.add(getEntitySet(nameContainer, "ESBase"));
+    entitySets.add(getEntitySet(nameContainer, "ESTwoBase"));
+    entitySets.add(getEntitySet(nameContainer, "ESTwoKeyTwoPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESBaseTwoKeyTwoPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESTwoBaseTwoKeyTwoPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESAllKey"));
+    entitySets.add(getEntitySet(nameContainer, "ESCompAllPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESCompCollAllPrim"));
+    entitySets.add(getEntitySet(nameContainer, "ESCompComp"));
+    entitySets.add(getEntitySet(nameContainer, "ESCompCollComp"));
+    entitySets.add(getEntitySet(nameContainer, "ESMedia"));
+    entitySets.add(getEntitySet(nameContainer, "ESKeyTwoKeyComp"));
+    entitySets.add(getEntitySet(nameContainer, "ESInvisible"));
+    entitySets.add(getEntitySet(nameContainer, "ESServerSidePaging"));
+    entitySets.add(getEntitySet(nameContainer, "ESAllNullable"));
+    entitySets.add(getEntitySet(nameContainer, "ESKeyNav"));
+    entitySets.add(getEntitySet(nameContainer, "ESTwoKeyNav"));
+    entitySets.add(getEntitySet(nameContainer, "ESBaseTwoKeyNav"));
+    entitySets.add(getEntitySet(nameContainer, "ESCompMixPrimCollComp"));
+    entitySets.add(getEntitySet(nameContainer, "ESFourKeyAlias"));
+
+    // Singletons
+    List<Singleton> singletons = new ArrayList<Singleton>();
+    container.setSingletons(singletons);
+    singletons.add(getSingleton(nameContainer, "SI"));
+    singletons.add(getSingleton(nameContainer, "SINav"));
+    singletons.add(getSingleton(nameContainer, "SIMedia"));
+
+    // ActionImports
+    List<ActionImport> actionImports = new ArrayList<ActionImport>();
+    container.setActionImports(actionImports);
+    actionImports.add(getActionImport(nameContainer, "AIRTPrimParam"));
+    actionImports.add(getActionImport(nameContainer, "AIRTPrimCollParam"));
+    actionImports.add(getActionImport(nameContainer, "AIRTCompParam"));
+    actionImports.add(getActionImport(nameContainer, "AIRTCompCollParam"));
+    actionImports.add(getActionImport(nameContainer, "AIRTETParam"));
+    actionImports.add(getActionImport(nameContainer, "AIRTETCollAllPrimParam"));
+
+    // FunctionImports
+    List<FunctionImport> functionImports = new ArrayList<FunctionImport>();
+    container.setFunctionImports(functionImports);
+    functionImports.add(getFunctionImport(nameContainer, "FINRTInt16"));
+    functionImports.add(getFunctionImport(nameContainer, "FINInvisibleRTInt16"));
+    functionImports.add(getFunctionImport(nameContainer, "FINInvisible2RTInt16"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTETKeyNav"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTETTwoKeyNavParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTStringTwoParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCollStringTwoParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCTAllPrimTwoParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTESMixPrimCollCompTwoParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FINRTESMixPrimCollCompTwoParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCollCTTwoPrim"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTETMedia"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCTTwoPrimParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCTTwoPrim"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCollString"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTString"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTESTwoKeyNavParam"));
+    functionImports.add(getFunctionImport(nameContainer, "FICRTCollCTTwoPrimParam"));
+
+    return schemas;
+  }
+
+  @Override
   public ActionImport getActionImport(final FullQualifiedName entityContainer, final String name) throws ODataException
   {
     if (entityContainer.equals(nameContainer)) {
@@ -876,34 +1085,42 @@ public class EdmTechProvider extends EdmProvider {
         return new EntitySet()
             .setName("ESKeyTwoKeyComp")
             .setType(nameETKeyTwoKeyComp);
+
       } else if (name.equals("ESInvisible")) {
         return new EntitySet()
             .setName("ESInvisible")
             .setType(nameETAllPrim);
+
       } else if (name.equals("ESServerSidePaging")) {
         return new EntitySet()
             .setName("ESServerSidePaging")
             .setType(nameETServerSidePaging);
+
       } else if (name.equals("ESAllNullable")) {
         return new EntitySet()
             .setName("ESAllNullable")
             .setType(nameETAllNullable);
+
       } else if (name.equals("ESKeyNav")) {
         return new EntitySet()
             .setName("ESKeyNav")
             .setType(nameETKeyNav);
+
       } else if (name.equals("ESTwoKeyNav")) {
         return new EntitySet()
             .setName("ESTwoKeyNav")
             .setType(nameETTwoKeyNav);
+
       } else if (name.equals("ESBaseTwoKeyNav")) {
         return new EntitySet()
             .setName("ESBaseTwoKeyNav")
             .setType(nameETBaseTwoKeyNav);
+
       } else if (name.equals("ESCompMixPrimCollComp")) {
         return new EntitySet()
             .setName("ESCompMixPrimCollComp")
             .setType(nameETCompMixPrimCollComp);
+
       } else if (name.equals("ESFourKeyAlias")) {
         return new EntitySet()
             .setName("ESFourKeyAlias")
@@ -1203,6 +1420,13 @@ public class EdmTechProvider extends EdmProvider {
                   .setPropertyName("PropertyComplexComplex/PropertyComplex/PropertyString")
                   .setAlias("KeyAlias3")))
           .setProperties(Arrays.asList(propertyGuid, propertyComplex_CTTwoPrim, propertyComplexComplex_CTCompComp));
+    } else if (entityTypeName.equals(nameETCompMixPrimCollComp)) {
+      return new EntityType()
+          .setName("ETCompMixPrimCollComp")
+          .setKey(Arrays.asList(
+              new PropertyRef()
+                  .setPropertyName("PropertyInt16")))
+          .setProperties(Arrays.asList(propertyInt16_NotNullable, propertyMixedPrimCollComp_CTMixPrimCollComp));
     }
 
     return null;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
index 96afc8e..3672799 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/EdmTechTestProvider.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/StringUtils.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/StringUtils.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/StringUtils.java
index b7d8e2c..8cabcf1 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/StringUtils.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/testutil/StringUtils.java
@@ -25,7 +25,7 @@ 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")));
@@ -48,5 +48,5 @@ public class StringUtils {
       throw new RuntimeException(e);
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/RawUriTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/RawUriTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/RawUriTest.java
index f100eef..f54ad57 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/RawUriTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/RawUriTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -122,21 +122,19 @@ public class RawUriTest {
 
     rawUri = runRawParser("nonServiceSegment/entitySet", 1);
     checkPath(rawUri, "nonServiceSegment/entitySet", Arrays.asList("entitySet"));
-    
+
     rawUri = runRawParser("http://test.org/a?abc=xx+yz", 0);
   }
 
-  
-    @Test
-    public void testSplitt() {
+  @Test
+  public void testSplitt() {
     UriDecoder.splitt("", '/');
     UriDecoder.splitt("/", '/');
     UriDecoder.splitt("a", '/');
     UriDecoder.splitt("a/", '/');
     UriDecoder.splitt("/a", '/');
     UriDecoder.splitt("a/a", '/');
-    }
-   
+  }
 
   private void checkPath(final RawUri rawUri, final String path, final List<String> list) {
     assertEquals(path, rawUri.path);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
index 728d187..4474e07 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriInfoImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -38,9 +38,6 @@ import org.apache.olingo.server.api.uri.queryoption.CustomQueryOption;
 import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.server.core.testutil.EdmTechProvider;
 import org.apache.olingo.server.core.testutil.EdmTechTestProvider;
-import org.apache.olingo.server.core.uri.UriInfoImpl;
-import org.apache.olingo.server.core.uri.UriResourceActionImpl;
-import org.apache.olingo.server.core.uri.UriResourceEntitySetImpl;
 import org.apache.olingo.server.core.uri.queryoption.CountOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.CustomQueryOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.ExpandOptionImpl;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
index d03345e..0eb88e0 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/UriResourceImplTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -42,25 +42,6 @@ import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.server.core.edm.provider.EdmSingletonImpl;
 import org.apache.olingo.server.core.testutil.EdmTechProvider;
 import org.apache.olingo.server.core.testutil.EdmTechTestProvider;
-import org.apache.olingo.server.core.uri.UriParameterImpl;
-import org.apache.olingo.server.core.uri.UriResourceActionImpl;
-import org.apache.olingo.server.core.uri.UriResourceComplexPropertyImpl;
-import org.apache.olingo.server.core.uri.UriResourceCountImpl;
-import org.apache.olingo.server.core.uri.UriResourceEntitySetImpl;
-import org.apache.olingo.server.core.uri.UriResourceFunctionImpl;
-import org.apache.olingo.server.core.uri.UriResourceItImpl;
-import org.apache.olingo.server.core.uri.UriResourceLambdaAllImpl;
-import org.apache.olingo.server.core.uri.UriResourceLambdaAnyImpl;
-import org.apache.olingo.server.core.uri.UriResourceLambdaVarImpl;
-import org.apache.olingo.server.core.uri.UriResourceNavigationPropertyImpl;
-import org.apache.olingo.server.core.uri.UriResourcePrimitivePropertyImpl;
-import org.apache.olingo.server.core.uri.UriResourceRefImpl;
-import org.apache.olingo.server.core.uri.UriResourceRootImpl;
-import org.apache.olingo.server.core.uri.UriResourceSingletonImpl;
-import org.apache.olingo.server.core.uri.UriResourceStartingTypeFilterImpl;
-import org.apache.olingo.server.core.uri.UriResourceTypedImpl;
-import org.apache.olingo.server.core.uri.UriResourceValueImpl;
-import org.apache.olingo.server.core.uri.UriResourceWithKeysImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.ExpressionImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.LiteralImpl;
 import org.junit.Test;
@@ -219,12 +200,11 @@ public class UriResourceImplTest {
         .getFunction(new ArrayList<String>());
     assertNotNull(function);
     impl.setFunction(function);
-    
 
     assertEquals(function, impl.getFunction());
     assertEquals("UFNRTInt16", impl.toString());
     assertEquals(function.getReturnType().getType(), impl.getType());
-    assertEquals(false,impl.isParameterListFilled());
+    assertEquals(false, impl.isParameterListFilled());
 
     // function import
     impl = new UriResourceFunctionImpl();
@@ -247,7 +227,7 @@ public class UriResourceImplTest {
     assertEquals(false, impl.isCollection());
 
     assertEquals(parameter, impl.getParameters().get(0));
-    assertEquals(true,impl.isParameterListFilled());
+    assertEquals(true, impl.isParameterListFilled());
   }
 
   @Test
@@ -498,7 +478,6 @@ public class UriResourceImplTest {
     assertEquals(true, impl.isCollection());
   }
 
-  
   @Test
   public void testUriResourceStartingTypeFilterImpl() {
     UriResourceStartingTypeFilterImpl impl = new UriResourceStartingTypeFilterImpl();

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestLexer.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestLexer.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestLexer.java
index 7a510a1..e8aa9ce 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestLexer.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestLexer.java
@@ -1,25 +1,24 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * 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.uri.antlr;
 
 import org.antlr.v4.runtime.Lexer;
-import org.apache.olingo.server.core.uri.antlr.UriLexer;
 import org.apache.olingo.server.core.uri.testutil.TokenValidator;
 import org.junit.Test;
 
@@ -72,17 +71,17 @@ public class TestLexer {
     test.run("$top=1").isAllText("$top=1").isType(UriLexer.TOP);
     test.run("$top=2").isAllText("$top=2").isType(UriLexer.TOP);
     test.run("$top=123").isAllText("$top=123").isType(UriLexer.TOP);
-    
+
     test.run("$levels=1").isAllText("$levels=1").isType(UriLexer.LEVELS);
     test.run("$levels=2").isAllText("$levels=2").isType(UriLexer.LEVELS);
     test.run("$levels=123").isAllText("$levels=123").isType(UriLexer.LEVELS);
     test.run("$levels=max").isAllText("$levels=max").isType(UriLexer.LEVELS);
-    
+
     test.run("$format=atom").isAllText("$format=atom").isType(UriLexer.FORMAT);
     test.run("$format=json").isAllText("$format=json").isType(UriLexer.FORMAT);
     test.run("$format=xml").isAllText("$format=xml").isType(UriLexer.FORMAT);
     test.run("$format=abc/def").isAllText("$format=abc/def").isType(UriLexer.FORMAT);
-    
+
     test.run("$id=123").isAllText("$id=123").isType(UriLexer.ID);
     test.run("$id=ABC").isAllText("$id=ABC").isType(UriLexer.ID);
 
@@ -120,7 +119,6 @@ public class TestLexer {
 
   }
 
-
   // ;------------------------------------------------------------------------------
   // ; 7. Literal Data Values
   // ;------------------------------------------------------------------------------
@@ -226,7 +224,6 @@ public class TestLexer {
 
   }
 
-  
   @Test
   public void testDelims() {
     String reserved = "/";

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
index fd4173f..64ac50e 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/antlr/TestUriParserImpl.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -200,7 +200,7 @@ public class TestUriParserImpl {
     testRes.run("ESAllPrim/$count")
         .at(0)
         .isUriPathInfoKind(UriResourceKind.entitySet)
-        .isType(EdmTechProvider.nameETAllPrim,true)
+        .isType(EdmTechProvider.nameETAllPrim, true)
         .at(1)
         .isUriPathInfoKind(UriResourceKind.count);
 
@@ -504,7 +504,7 @@ public class TestUriParserImpl {
     testRes.run("ESTwoPrim/com.sap.odata.test1.ETBase")
         .at(0)
         .isEntitySet("ESTwoPrim")
-        .isType(EdmTechProvider.nameETTwoPrim,true)
+        .isType(EdmTechProvider.nameETTwoPrim, true)
         .isTypeFilterOnCollection(EdmTechProvider.nameETBase)
         .isTypeFilterOnEntry(null);
 
@@ -517,9 +517,9 @@ public class TestUriParserImpl {
         .isTypeFilterOnCollection(EdmTechProvider.nameETBase)
         .isTypeFilterOnEntry(null)
         .at(0)
-        .isType(EdmTechProvider.nameETTwoPrim,false)
+        .isType(EdmTechProvider.nameETTwoPrim, false)
         .isKeyPredicate(0, "PropertyInt16", "1");
-        
+
     // filter before key predicate; property of sub type
     testRes.run("ESTwoPrim/com.sap.odata.test1.ETBase(PropertyInt16=1)/AdditionalPropertyString_5")
         .at(0)
@@ -538,7 +538,7 @@ public class TestUriParserImpl {
         .at(0)
         .isEntitySet("ESTwoPrim")
         .isUriPathInfoKind(UriResourceKind.entitySet)
-        .isType(EdmTechProvider.nameETTwoPrim,false)
+        .isType(EdmTechProvider.nameETTwoPrim, false)
         .isTypeFilterOnCollection(null)
         .isTypeFilterOnEntry(EdmTechProvider.nameETBase)
         .isKeyPredicate(0, "PropertyInt16", "1");

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
index 84217df..cce237e 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/QueryOptionTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -30,24 +30,6 @@ import org.apache.olingo.server.api.uri.queryoption.SystemQueryOptionKind;
 import org.apache.olingo.server.core.edm.provider.EdmProviderImpl;
 import org.apache.olingo.server.core.testutil.EdmTechTestProvider;
 import org.apache.olingo.server.core.uri.UriInfoImpl;
-import org.apache.olingo.server.core.uri.queryoption.AliasQueryOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.CountOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.ExpandItemImpl;
-import org.apache.olingo.server.core.uri.queryoption.ExpandOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.FilterOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.FormatOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.IdOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.LevelsOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.OrderByItemImpl;
-import org.apache.olingo.server.core.uri.queryoption.OrderByOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.QueryOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.SearchOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.SelectItemImpl;
-import org.apache.olingo.server.core.uri.queryoption.SelectOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.SkipOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.SkipTokenOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.SystemQueryOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.TopOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.AliasImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.ExpressionImpl;
 import org.apache.olingo.server.core.uri.queryoption.expression.LiteralImpl;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
index 8eedce6..161a0fd 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/queryoption/expression/ExpressionTest.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -41,16 +41,6 @@ import org.apache.olingo.server.core.testutil.EdmTechTestProvider;
 import org.apache.olingo.server.core.uri.UriInfoImpl;
 import org.apache.olingo.server.core.uri.UriResourceActionImpl;
 import org.apache.olingo.server.core.uri.UriResourceFunctionImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.AliasImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.BinaryImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.EnumerationImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.ExpressionImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.LambdaRefImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.LiteralImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.MemberImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.MethodImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.TypeLiteralImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.UnaryImpl;
 import org.apache.olingo.server.core.uri.testutil.FilterTreeToText;
 import org.junit.Test;
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ExpandValidator.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ExpandValidator.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ExpandValidator.java
index 21df8bb..98cbce6 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ExpandValidator.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/ExpandValidator.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */
@@ -35,7 +35,6 @@ import org.apache.olingo.server.core.uri.queryoption.FilterOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.OrderByOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.QueryOptionImpl;
 import org.apache.olingo.server.core.uri.queryoption.SelectOptionImpl;
-import org.apache.olingo.server.core.uri.queryoption.expression.MemberImpl;
 
 public class ExpandValidator implements Validator {
   private Edm edm;
@@ -220,13 +219,12 @@ public class ExpandValidator implements Validator {
   }
 
   public ExpandValidator isExpandStartType(final FullQualifiedName fullName) {
-      EdmType actualType = expandItem.getStartTypeFilter();
-      
-      FullQualifiedName actualName = new FullQualifiedName(actualType.getNamespace(), actualType.getName());
-      assertEquals(fullName, actualName);
-      return this;
-   
-    
+    EdmType actualType = expandItem.getStartTypeFilter();
+
+    FullQualifiedName actualName = new FullQualifiedName(actualType.getNamespace(), actualType.getName());
+    assertEquals(fullName, actualName);
+    return this;
+
   }
 
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/6fdfc458/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterTreeToText.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterTreeToText.java b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterTreeToText.java
index 7702a63..06056e0 100644
--- a/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterTreeToText.java
+++ b/lib/server-core/src/test/java/org/apache/olingo/server/core/uri/testutil/FilterTreeToText.java
@@ -1,18 +1,18 @@
-/* 
+/*
  * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
+ * or more contributor license agreements. See the NOTICE file
  * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
+ * 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
- *
+ * 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
+ * KIND, either express or implied. See the License for the
  * specific language governing permissions and limitations
  * under the License.
  */