olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [08/11] olingo-odata4 git commit: [OLINGO-789] server support for action parameters of all types
Date Mon, 05 Oct 2015 06:02:05 GMT
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/d6db341d/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/DeepInsertITCase.java
----------------------------------------------------------------------
diff --git a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/DeepInsertITCase.java b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/DeepInsertITCase.java
index 683c6ed..d8a467a 100644
--- a/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/DeepInsertITCase.java
+++ b/fit/src/test/java/org/apache/olingo/fit/tecsvc/client/DeepInsertITCase.java
@@ -22,6 +22,7 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
+import static org.junit.Assume.assumeTrue;
 
 import java.net.URI;
 import java.util.HashMap;
@@ -29,6 +30,8 @@ import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
+import org.apache.olingo.client.api.EdmEnabledODataClient;
+import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.communication.ODataClientErrorException;
 import org.apache.olingo.client.api.communication.request.cud.ODataEntityCreateRequest;
 import org.apache.olingo.client.api.communication.request.cud.UpdateType;
@@ -53,20 +56,7 @@ import org.apache.olingo.commons.api.http.HttpStatusCode;
 import org.junit.Ignore;
 import org.junit.Test;
 
-/**
- * The issue I see with this unit test, or in general with JSON metadata=minimal case is
- * none of the navigation properties will be represented as such in deserialized form, because
- * no navigation link information will be written when metadata=minimal. The client will
- * interpret those results as complex properties (which I do not think is right).
- * 
- * Where as in the atom+xml case, there is no intermediate results, it is equivalent to
- * metadata=full, thus the navigation links and inline content is correctly represented through
- * deserialization. 
- * 
- * For above reason, the DeepInsertXMLITCase case re-written slightly differently.  
- *
- */
-public class DeepInsertITCase extends AbstractTecSvcITCase {
+public class DeepInsertITCase extends AbstractParamTecSvcITCase {
 
   private static final String ES_KEY_NAV = "ESKeyNav";
   private static final String ES_TWO_KEY_NAV = "ESTwoKeyNav";
@@ -95,58 +85,74 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
 
   @Test
   public void deepInsertExpandedResponse() {
-    final URI createURI = getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build();
+    assumeTrue("The server XML deserializer does not (yet?!) fill the expand information;"
+        + " the response is therefore not expanded in XML.",
+        isJson());  // TODO: XML case
+    final ODataClient client = getEdmEnabledClient();
+    final URI createURI = client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build();
     final ClientObjectFactory factory = getFactory();
     final ClientEntity entity = factory.newEntity(ET_KEY_NAV);
 
     // Root entity
-    entity.getProperties().add(
-        factory.newPrimitiveProperty(PROPERTY_STRING,
-                factory.newPrimitiveValueBuilder().buildString("String Property level 0")));
-    entity.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
+    entity.getProperties()
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+            factory.newPrimitiveValueBuilder().buildString("String Property level 0")));
+    entity.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 41)))
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 41)))
                 .add(factory.newPrimitiveProperty(PROPERTY_STRING,
-                        factory.newPrimitiveValueBuilder().buildString("String Property level 0, complex level " +
-                                "1")))));
+                    factory.newPrimitiveValueBuilder().buildString("String Property level 0, complex level 1")))));
 
     // First level NavPropertyETTwoKeyNavOne => Type ETTwoKeyNav
     final ClientEntity firstLevelTwoKeyNav = factory.newEntity(ET_TWO_KEY_NAV);
-    firstLevelTwoKeyNav.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
+    firstLevelTwoKeyNav.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 42)))
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 42)))
                 .add(factory.newPrimitiveProperty(PROPERTY_STRING,
-                        factory.newPrimitiveValueBuilder().buildString("String Property level 1, complex level 1")))));
-    firstLevelTwoKeyNav.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)));
-    firstLevelTwoKeyNav.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)));
+                    factory.newPrimitiveValueBuilder().buildString("String Property level 1, complex level 1")))));
+    firstLevelTwoKeyNav.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 9999)))));
+    firstLevelTwoKeyNav.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 8888)))));
     final ClientInlineEntity firstLevelTwoKeyOneInline =
         factory.newDeepInsertEntity(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE, firstLevelTwoKeyNav);
     entity.addLink(firstLevelTwoKeyOneInline);
 
     // Second level NavPropertyETTwoKeyNavOne => Type ETTwoKeyNav
     final ClientEntity secondLevelTwoKeyNav = factory.newEntity(ET_TWO_KEY_NAV);
-    secondLevelTwoKeyNav.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
+    secondLevelTwoKeyNav.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 421)))
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 421)))
                 .add(factory.newPrimitiveProperty(PROPERTY_STRING,
-                        factory.newPrimitiveValueBuilder().buildString("String Property level 2, complex level 1")))));
-    secondLevelTwoKeyNav.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)));
-    secondLevelTwoKeyNav.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)));
+                    factory.newPrimitiveValueBuilder().buildString("String Property level 2, complex level 1")))));
+    secondLevelTwoKeyNav.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 9999)))));
+    secondLevelTwoKeyNav.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 8888)))));
 
     // Binding links
-    secondLevelTwoKeyNav.addLink(factory.newEntityNavigationLink(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE, getClient()
-            .newURIBuilder(
-                    SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(new LinkedHashMap<String,
-                    Object>() {
+    secondLevelTwoKeyNav.addLink(factory.newEntityNavigationLink(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE,
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(
+            new LinkedHashMap<String, Object>() {
               private static final long serialVersionUID = 3109256773218160485L;
-
               {
                 put(PROPERTY_INT16, 3);
                 put(PROPERTY_STRING, "1");
@@ -159,57 +165,76 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
 
     // Third level NavPropertyETTwoKeyNavMany => Type ETTwoKeyNav
     final ClientEntity thirdLevelTwoKeyNavMany1 = factory.newEntity(ET_TWO_KEY_NAV);
-    thirdLevelTwoKeyNavMany1.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
+    thirdLevelTwoKeyNavMany1.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 431)))
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 431)))
                 .add(factory.newPrimitiveProperty(PROPERTY_STRING,
-                        factory.newPrimitiveValueBuilder().buildString("String Property level 3, complex level " +
-                                "1")))));
-    thirdLevelTwoKeyNavMany1.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)));
-    thirdLevelTwoKeyNavMany1.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)));
+                    factory.newPrimitiveValueBuilder().buildString("String Property level 3, complex level 1")))));
+    thirdLevelTwoKeyNavMany1.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 9999)))));
+    thirdLevelTwoKeyNavMany1.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 8888)))));
 
     final ClientEntity thirdLevelTwoKeyNavMany2 = factory.newEntity(ET_TWO_KEY_NAV);
-    thirdLevelTwoKeyNavMany2.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
+    thirdLevelTwoKeyNavMany2.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 432)))
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 432)))
                 .add(factory.newPrimitiveProperty(PROPERTY_STRING,
-                        factory.newPrimitiveValueBuilder().buildString("String Property level 3, complex level " +
-                                "1")))));
-    thirdLevelTwoKeyNavMany2.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)));
-    thirdLevelTwoKeyNavMany2.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)));
+                    factory.newPrimitiveValueBuilder().buildString("String Property level 3, complex level 1")))));
+    thirdLevelTwoKeyNavMany2.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 9999)))));
+    thirdLevelTwoKeyNavMany2.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 8888)))));
 
     final ClientEntitySet entitySetThirdLevelTwoKeyNavMany = factory.newEntitySet();
     entitySetThirdLevelTwoKeyNavMany.getEntities().add(thirdLevelTwoKeyNavMany1);
     entitySetThirdLevelTwoKeyNavMany.getEntities().add(thirdLevelTwoKeyNavMany2);
     secondLevelTwoKeyNav.addLink(factory.newDeepInsertEntitySet(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY,
-            entitySetThirdLevelTwoKeyNavMany));
+        entitySetThirdLevelTwoKeyNavMany));
 
     // First level NavPropertyETTwoKeyNavMany => Type ETTwoKeyNav
     final ClientEntity firstLevelTwoKeyNavMany1 = factory.newEntity(ET_TWO_KEY_NAV);
-    firstLevelTwoKeyNavMany1.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
+    firstLevelTwoKeyNavMany1.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 422)))
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 422)))
                 .add(factory.newPrimitiveProperty(PROPERTY_STRING,
-                        factory.newPrimitiveValueBuilder().buildString("String Property level 1, complex level 1")))));
-    firstLevelTwoKeyNavMany1.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)));
-    firstLevelTwoKeyNavMany1.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)));
+                    factory.newPrimitiveValueBuilder().buildString("String Property level 1, complex level 1")))));
+    firstLevelTwoKeyNavMany1.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 9999)))));
+    firstLevelTwoKeyNavMany1.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 8888)))));
 
     final ClientEntitySet entitySetfirstLevelTwoKeyNavMany = factory.newEntitySet();
     entitySetfirstLevelTwoKeyNavMany.getEntities().add(firstLevelTwoKeyNavMany1);
     entity.addLink(factory.newDeepInsertEntitySet(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY,
-            entitySetfirstLevelTwoKeyNavMany));
+        entitySetfirstLevelTwoKeyNavMany));
 
     final ODataEntityCreateResponse<ClientEntity> createResponse =
-        getEdmEnabledClient().getCUDRequestFactory().getEntityCreateRequest(createURI, entity).execute();
+        client.getCUDRequestFactory().getEntityCreateRequest(createURI, entity).execute();
 
     // Check response
     final ClientEntity resultEntityFirstLevel =
@@ -254,58 +279,66 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
 
   @Test
   public void simpleDeepInsert() throws Exception {
-    final URI createURI = getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build();
+    final ODataClient client = getEdmEnabledClient();
+    final URI createURI = client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build();
     final ClientObjectFactory factory = getFactory();
     final ClientEntity entity = factory.newEntity(ET_KEY_NAV);
 
     // Prepare entity(EntitySet: ESKeyNav, Type: ETKeyNav)
     entity.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short)
-            42)));
+        .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 42)));
     entity.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")));
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_NAV_FIVE_PROP)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_NAV_FIVE_PROP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                     factory.newPrimitiveValueBuilder().buildInt16((short) 42)))));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_ALL_PRIM, factory.newComplexValue(CT_ALL_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")))));
+        .add(factory.newComplexProperty(PROPERTY_COMP_ALL_PRIM,
+            factory.newComplexValue(CT_ALL_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("42")))));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16
-                    ((short)
-                    42)))
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")))));
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 42)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("42")))));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_COMP_NAV, factory.newComplexValue(CT_PRIM_COMP)
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder()
-                    .buildString("42")))
-            .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_NAV_FIVE_PROP)
-                    .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_COMP_NAV,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("42")))
+                .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+                    factory.newComplexValue(CT_NAV_FIVE_PROP)
+                        .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                             factory.newPrimitiveValueBuilder().buildInt16((short) 42)))))));
 
     // Non collection navigation property
     // Create related entity(EntitySet: ESTwoKeyNav, Type: ETTwoKeyNav, Nav. Property: NavPropertyETTwoKeyNavOne)
     final ClientEntity inlineEntitySingle = factory.newEntity(ET_TWO_KEY_NAV);
     inlineEntitySingle.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 43)));
+        .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 43)));
+    inlineEntitySingle.getProperties()
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("43")));
     inlineEntitySingle.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("43")));
-    inlineEntitySingle.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)
+        .add(factory.newComplexProperty(PROPERTY_COMP,
+            factory.newComplexValue(CT_PRIM_COMP)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 430)))));
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 430)))));
     inlineEntitySingle.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_PRIM_COMP)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                     factory.newPrimitiveValueBuilder().buildInt16((short) 431)))));
     inlineEntitySingle.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16
-                    ((short)
-                    432)))
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 432)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
                     factory.newPrimitiveValueBuilder().buildString("432")))));
 
     // Collection navigation property
@@ -313,45 +346,49 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
     // Create related entity(EntitySet: ESTwoKeyNav, Type: NavPropertyETTwoKeyNavMany
     final ClientEntity inlineEntityCol1 = factory.newEntity(ET_TWO_KEY_NAV);
     inlineEntityCol1.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 44)));
+        .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 44)));
     inlineEntityCol1.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("44")));
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("44")));
     inlineEntityCol1.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_PRIM_COMP)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                     factory.newPrimitiveValueBuilder().buildInt16((short) 441)))));
-    inlineEntityCol1.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)
+    inlineEntityCol1.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP,
+            factory.newComplexValue(CT_PRIM_COMP)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 440)))));
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 440)))));
     inlineEntityCol1.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16
-                    ((short) 442)))
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("442"))
-            )));
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 442)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("442")))));
 
     final ClientEntity inlineEntityCol2 = factory.newEntity(ET_TWO_KEY_NAV);
     inlineEntityCol2.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short)
-            45)));
+        .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 45)));
     inlineEntityCol2.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("45")));
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("45")));
     inlineEntityCol2.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_PRIM_COMP)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                     factory.newPrimitiveValueBuilder().buildInt16((short) 451)))));
-    inlineEntityCol2.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)
+    inlineEntityCol2.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP,
+            factory.newComplexValue(CT_PRIM_COMP)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 450)))));
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 450)))));
     inlineEntityCol2.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16
-                    ((short)
-                    452)))
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder()
-                    .buildString("452")))));
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 452)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("452")))));
 
     final ClientInlineEntity newDeepInsertEntityLink =
         factory.newDeepInsertEntity(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE, inlineEntitySingle);
@@ -365,7 +402,7 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
     entity.addLink(newDeepInsertEntitySetLink);
 
     // Perform create request
-    final ODataEntityCreateResponse<ClientEntity> responseCreate = getClient().getCUDRequestFactory()
+    final ODataEntityCreateResponse<ClientEntity> responseCreate = client.getCUDRequestFactory()
         .getEntityCreateRequest(createURI, entity)
         .execute();
     assertEquals(HttpStatusCode.CREATED.getStatusCode(), responseCreate.getStatusCode());
@@ -375,241 +412,251 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
     // Fetch ESKeyNav entity with expand of NavPropertyETTwoKeyNavOne nav. property
     ClientProperty propertyInt16 = responseCreate.getBody().getProperty(PROPERTY_INT16);
     final URI esKeyNavURI =
-        getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(
             propertyInt16.getPrimitiveValue().toValue()).expand(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE,
                 NAV_PROPERTY_ET_TWO_KEY_NAV_MANY).build();
 
-    final ODataEntityRequest<ClientEntity> esKeyNavRequest = getClient().getRetrieveRequestFactory()
+    final ODataEntityRequest<ClientEntity> esKeyNavRequest = client.getRetrieveRequestFactory()
         .getEntityRequest(esKeyNavURI);
     esKeyNavRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
     final ODataRetrieveResponse<ClientEntity> esKeyNavResponse = esKeyNavRequest.execute();
 
+    final ClientEntity clientEntity = esKeyNavResponse.getBody();
     // Check nav. property NavPropertyETTwoKeyNavOne
-    assertNotNull(esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE));
-    assertEquals(431, esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE).getComplexValue().get(
-        PROPERTY_COMP_NAV).getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertNotNull(clientEntity.getNavigationLink(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE));
+    ClientInlineEntity navOne = ((ClientInlineEntity) clientEntity.getNavigationLink(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE));
+    assertShortOrInt(431, navOne.getEntity().getProperty(PROPERTY_COMP_NAV).getComplexValue()
+        .get(PROPERTY_INT16).getPrimitiveValue().toValue());
 
     // Check nav. property NavPropertyETTwoKeyNavMany
-    assertNotNull(esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY));
-    assertEquals(2, esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY).getCollectionValue()
-        .size());
-    Iterator<ClientValue> twoKeyNavManyIterator =
-        esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY).getCollectionValue().iterator();
-    final ClientValue firstTwoKeyNavEnity = twoKeyNavManyIterator.next(); // First entity
-    assertEquals(441, firstTwoKeyNavEnity.asComplex().get(PROPERTY_COMP_NAV).getValue().asComplex().get(
-        PROPERTY_INT16).getPrimitiveValue().toValue());
-    final ClientValue secondTwoKeyNavEnity = twoKeyNavManyIterator.next(); // Second entity
-    assertEquals(451, secondTwoKeyNavEnity.asComplex().get(PROPERTY_COMP_NAV).getValue().asComplex().get(
-        PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertNotNull(clientEntity.getNavigationLink(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY));
+    ClientInlineEntitySet navMany = (ClientInlineEntitySet)
+        clientEntity.getNavigationLink(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY);
+    assertEquals(2, navMany.getEntitySet().getEntities().size());
+    
+    assertShortOrInt(441, navMany.getEntitySet().getEntities().get(0).getProperty(PROPERTY_COMP_NAV)
+        .getValue().asComplex().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertShortOrInt(451, navMany.getEntitySet().getEntities().get(1).getProperty(PROPERTY_COMP_NAV)
+        .getValue().asComplex().get(PROPERTY_INT16).getPrimitiveValue().toValue());
 
     // Fetch ESTwoKeyNav entities and check if available and the partner relation have been set up
     // Check ESTwoKeyNav(Created via NavPropertyETTwoKeyNavOne)
     Map<String, Object> composedKey = new HashMap<String, Object>();
-    composedKey.put(PROPERTY_INT16, esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE)
-        .getComplexValue().get(PROPERTY_INT16)
-        .getPrimitiveValue().toValue());
-    composedKey.put(PROPERTY_STRING, esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE)
-        .getComplexValue().get(PROPERTY_STRING)
-        .getPrimitiveValue().toValue());
+    composedKey.put(PROPERTY_INT16, navOne.getEntity().getProperty(PROPERTY_INT16).getPrimitiveValue().toValue());
+    composedKey.put(PROPERTY_STRING, navOne.getEntity().getProperty(PROPERTY_STRING).getPrimitiveValue().toValue());
 
-    final URI esTwoKeyNavEntitySingleURI = getClient().newURIBuilder(SERVICE_URI)
+    final URI esTwoKeyNavEntitySingleURI = client.newURIBuilder(SERVICE_URI)
         .appendEntitySetSegment(ES_TWO_KEY_NAV)
         .appendKeySegment(composedKey)
         .build();
-
-    final ODataEntityRequest<ClientEntity> esTwoKeyNavSingleRequest = getClient().getRetrieveRequestFactory()
+    final ODataEntityRequest<ClientEntity> esTwoKeyNavSingleRequest = client.getRetrieveRequestFactory()
         .getEntityRequest(esTwoKeyNavEntitySingleURI);
     esTwoKeyNavSingleRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
     final ODataRetrieveResponse<ClientEntity> esTwoKeyNavSingleResponse = esTwoKeyNavSingleRequest.execute();
-    assertEquals(431, esTwoKeyNavSingleResponse.getBody().getProperty(PROPERTY_COMP_NAV).getComplexValue().get(
-        PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertShortOrInt(431, esTwoKeyNavSingleResponse.getBody().getProperty(PROPERTY_COMP_NAV).getComplexValue()
+        .get(PROPERTY_INT16).getPrimitiveValue().toValue());
 
     // Check ESTwoKeyNav(Created via NavPropertyETTwoKeyNavMany(0))
     composedKey.clear();
-    composedKey.put(PROPERTY_INT16, firstTwoKeyNavEnity.asComplex().get(PROPERTY_INT16).getPrimitiveValue().toValue());
-    composedKey.put(PROPERTY_STRING, firstTwoKeyNavEnity.asComplex().get(PROPERTY_STRING).getPrimitiveValue()
-        .toValue());
+    composedKey.put(PROPERTY_INT16, navMany.getEntitySet().getEntities().get(0).getProperty(PROPERTY_INT16)
+        .getPrimitiveValue().toValue());
+    composedKey.put(PROPERTY_STRING, navMany.getEntitySet().getEntities().get(0).getProperty(PROPERTY_STRING)
+        .getPrimitiveValue().toValue());
 
     URI esTwoKeyNavEntityManyOneURI =
-        getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(composedKey)
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(composedKey)
         .expand(NAV_PROPERTY_ET_KEY_NAV_ONE).build();
 
     final ODataEntityRequest<ClientEntity> esTwoKeyNavManyOneRequest =
-        getClient().getRetrieveRequestFactory().getEntityRequest(esTwoKeyNavEntityManyOneURI);
+        client.getRetrieveRequestFactory().getEntityRequest(esTwoKeyNavEntityManyOneURI);
     esTwoKeyNavManyOneRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
     final ODataRetrieveResponse<ClientEntity> esTwoKeyNavManyOneResponse = esTwoKeyNavManyOneRequest.execute();
 
-    assertEquals(441, esTwoKeyNavManyOneResponse.getBody().getProperty(PROPERTY_COMP_NAV).getComplexValue().get(
-        PROPERTY_INT16).getPrimitiveValue().toValue());
-    assertNotNull(esTwoKeyNavManyOneResponse.getBody().getProperty(NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue());
-    assertEquals(propertyInt16.getPrimitiveValue().toValue(), esTwoKeyNavManyOneResponse.getBody().getProperty(
-        NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertShortOrInt(441, esTwoKeyNavManyOneResponse.getBody().getProperty(PROPERTY_COMP_NAV)
+        .getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    
+    assertNotNull(esTwoKeyNavManyOneResponse.getBody().getNavigationLink(NAV_PROPERTY_ET_KEY_NAV_ONE));
+    ClientInlineEntity nvLink = (ClientInlineEntity)esTwoKeyNavManyOneResponse.getBody()
+        .getNavigationLink(NAV_PROPERTY_ET_KEY_NAV_ONE);
+    assertEquals(propertyInt16.getPrimitiveValue().toValue(), nvLink.getEntity().getProperty(PROPERTY_INT16)
+        .getPrimitiveValue().toValue());
 
     // Check ESTwoKeyNav(Created via NavPropertyETTwoKeyNavMany(1))
     composedKey.clear();
-    composedKey.put(PROPERTY_INT16, secondTwoKeyNavEnity.asComplex().get(PROPERTY_INT16).getPrimitiveValue().toValue());
-    composedKey.put(PROPERTY_STRING, secondTwoKeyNavEnity.asComplex().get(PROPERTY_STRING).getPrimitiveValue()
-        .toValue());
+    composedKey.put(PROPERTY_INT16, navMany.getEntitySet().getEntities().get(1).getProperty(PROPERTY_INT16)
+        .getPrimitiveValue().toValue());
+    composedKey.put(PROPERTY_STRING, navMany.getEntitySet().getEntities().get(1).getProperty(PROPERTY_STRING)
+        .getPrimitiveValue().toValue());
 
     URI esTwoKeyNavEntityManyTwoURI =
-        getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(composedKey)
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(composedKey)
         .expand(NAV_PROPERTY_ET_KEY_NAV_ONE).build();
 
     final ODataEntityRequest<ClientEntity> esTwoKeyNavManyTwoRequest =
-        getClient().getRetrieveRequestFactory().getEntityRequest(esTwoKeyNavEntityManyTwoURI);
+        client.getRetrieveRequestFactory().getEntityRequest(esTwoKeyNavEntityManyTwoURI);
     esTwoKeyNavManyTwoRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
     final ODataRetrieveResponse<ClientEntity> esTwoKeyNavManyTwoResponse = esTwoKeyNavManyTwoRequest.execute();
 
-    assertEquals(451, esTwoKeyNavManyTwoResponse.getBody().getProperty(PROPERTY_COMP_NAV).getComplexValue().get(
-        PROPERTY_INT16).getPrimitiveValue().toValue());
-    assertNotNull(esTwoKeyNavManyTwoResponse.getBody().getProperty(NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue());
-    assertEquals(propertyInt16.getPrimitiveValue().toValue(), esTwoKeyNavManyTwoResponse.getBody().getProperty(
-        NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertShortOrInt(451, esTwoKeyNavManyTwoResponse.getBody().getProperty(PROPERTY_COMP_NAV)
+        .getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertNotNull(esTwoKeyNavManyTwoResponse.getBody().getNavigationLink(NAV_PROPERTY_ET_KEY_NAV_ONE));
+    
+    nvLink = (ClientInlineEntity)esTwoKeyNavManyTwoResponse.getBody()
+        .getNavigationLink(NAV_PROPERTY_ET_KEY_NAV_ONE);
+    assertEquals(propertyInt16.getPrimitiveValue().toValue(), nvLink.getEntity().getProperty(PROPERTY_INT16)
+        .getPrimitiveValue().toValue());
   }
 
   @Test
-  public void deepInsertSameEntitySet() throws EdmPrimitiveTypeException {
-    final URI createURI = getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build();
+  public void deepInsertSameEntitySet() throws Exception {
+    final ODataClient client = getEdmEnabledClient();
+    final URI createURI = client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build();
     final ClientObjectFactory factory = getFactory();
     final ClientEntity entity = factory.newEntity(ET_KEY_NAV);
 
     // Prepare entity(EntitySet: ESKeyNav, Type: ETKeyNav)
     entity.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short)
-            42)));
+        .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 42)));
     entity.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")));
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_NAV_FIVE_PROP)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_NAV_FIVE_PROP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                     factory.newPrimitiveValueBuilder().buildInt16((short) 42)))));
-
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_ALL_PRIM, factory.newComplexValue(CT_ALL_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")))));
+        .add(factory.newComplexProperty(PROPERTY_COMP_ALL_PRIM,
+            factory.newComplexValue(CT_ALL_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("42")))));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16
-                    ((short)
-                    42)))
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")))));
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 42)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("42")))));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_COMP_NAV, factory.newComplexValue(CT_PRIM_COMP)
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder()
-                    .buildString("42")))
-            .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_NAV_FIVE_PROP)
-                    .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_COMP_NAV,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("42")))
+                .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+                    factory.newComplexValue(CT_NAV_FIVE_PROP)
+                        .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                             factory.newPrimitiveValueBuilder().buildInt16((short) 42)))))));
     entity.addLink(factory.newEntityNavigationLink("NavPropertyETTwoKeyNavOne",
-            getClient().newURIBuilder(SERVICE_URI)
-                    .appendEntitySetSegment(ES_TWO_KEY_NAV)
-                    .appendKeySegment(new LinkedHashMap<String, Object>() {
-                      private static final long serialVersionUID = 1L;
-
-                      {
-                        put(PROPERTY_INT16, 1);
-                        put(PROPERTY_STRING, "1");
-                      }
-                    })
-                    .build()));
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(
+            new LinkedHashMap<String, Object>() {
+              private static final long serialVersionUID = 1L;
+              {
+                put(PROPERTY_INT16, 1);
+                put(PROPERTY_STRING, "1");
+              }
+            }).build()));
 
     // Prepare inline entity(EntitySet: ESKeyNav, Type: ETKeyNav)
     final ClientEntity innerEntity = factory.newEntity(ET_KEY_NAV);
     innerEntity.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short)
-            43)));
+        .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 43)));
     innerEntity.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("43")));
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("43")));
     innerEntity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_NAV_FIVE_PROP)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_NAV_FIVE_PROP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                     factory.newPrimitiveValueBuilder().buildInt16((short) 431)))));
     innerEntity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_ALL_PRIM, factory.newComplexValue(CT_ALL_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("431"))
-            )));
+        .add(factory.newComplexProperty(PROPERTY_COMP_ALL_PRIM,
+            factory.newComplexValue(CT_ALL_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("431")))));
+    innerEntity.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 431)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("431")))));
     innerEntity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16
-                    ((short)
-                    431)))
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("431"))
-            )));
-    innerEntity
-    .getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_COMP_NAV, factory.newComplexValue(CT_PRIM_COMP)
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder()
-                    .buildString("431")))
-            .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_NAV_FIVE_PROP)
-                    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder()
-                            .buildInt16((short) 431)))))));
+        .add(factory.newComplexProperty(PROPERTY_COMP_COMP_NAV,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("431")))
+                .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+                    factory.newComplexValue(CT_NAV_FIVE_PROP)
+                        .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                            factory.newPrimitiveValueBuilder().buildInt16((short) 431)))))));
     innerEntity.addLink(factory.newEntityNavigationLink("NavPropertyETTwoKeyNavOne",
-            getClient().newURIBuilder(SERVICE_URI)
-                    .appendEntitySetSegment(ES_TWO_KEY_NAV)
-                    .appendKeySegment(new LinkedHashMap<String, Object>() {
-                      private static final long serialVersionUID = 1L;
-
-                      {
-                        put(PROPERTY_INT16, 1);
-                        put(PROPERTY_STRING, "1");
-                      }
-                    })
-                    .build()));
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(
+            new LinkedHashMap<String, Object>() {
+              private static final long serialVersionUID = 1L;
+              {
+                put(PROPERTY_INT16, 1);
+                put(PROPERTY_STRING, "1");
+              }
+            }).build()));
 
     ClientInlineEntity inlineEntity = factory.newDeepInsertEntity(NAV_PROPERTY_ET_KEY_NAV_ONE, innerEntity);
     entity.addLink(inlineEntity);
 
     final ODataEntityCreateResponse<ClientEntity> responseCreate =
-        getClient().getCUDRequestFactory().getEntityCreateRequest(createURI, entity).execute();
+        client.getCUDRequestFactory().getEntityCreateRequest(createURI, entity).execute();
     final String cookie = responseCreate.getHeader(HttpHeader.SET_COOKIE).iterator().next();
     final Short esKeyNavEntityKey =
         responseCreate.getBody().getProperty(PROPERTY_INT16).getPrimitiveValue().toCastValue(Short.class);
 
     // Fetch Entity
     URI fetchEntityURI =
-        getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(esKeyNavEntityKey)
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(esKeyNavEntityKey)
         .expand(NAV_PROPERTY_ET_KEY_NAV_ONE).build();
 
     ODataEntityRequest<ClientEntity> entityRequest =
-        getClient().getRetrieveRequestFactory().getEntityRequest(fetchEntityURI);
+        client.getRetrieveRequestFactory().getEntityRequest(fetchEntityURI);
     entityRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
     final ODataRetrieveResponse<ClientEntity> entityResponse = entityRequest.execute();
 
+    ClientEntity clientEntity = entityResponse.getBody();
+    ClientInlineEntity navOne =
+        (ClientInlineEntity) clientEntity.getNavigationLink(NAV_PROPERTY_ET_KEY_NAV_ONE);
+
     // Check values
-    assertEquals(431, entityResponse.getBody().getProperty(NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue().get(
-        PROPERTY_COMP_NAV).getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertShortOrInt(431, navOne.getEntity().getProperty(PROPERTY_COMP_NAV).getComplexValue()
+        .get(PROPERTY_INT16).getPrimitiveValue().toValue());
 
-    Short innerEntityInt16Key =
-        entityResponse.getBody().getProperty(NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue().get(PROPERTY_INT16)
-        .getPrimitiveValue().toCastValue(Short.class);
+    Short innerEntityInt16Key = navOne.getEntity().getProperty(PROPERTY_INT16).getPrimitiveValue()
+        .toCastValue(Short.class);
 
     final URI innerEntityURI =
-        getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(innerEntityInt16Key)
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(innerEntityInt16Key)
         .build();
     final ODataEntityRequest<ClientEntity> innerRequest =
-        getClient().getRetrieveRequestFactory().getEntityRequest(innerEntityURI);
+        client.getRetrieveRequestFactory().getEntityRequest(innerEntityURI);
     innerRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
     ODataRetrieveResponse<ClientEntity> innerResponse = innerRequest.execute();
 
-    assertEquals(431, innerResponse.getBody().getProperty(PROPERTY_COMP_NAV).getComplexValue().get(PROPERTY_INT16)
+    assertShortOrInt(431, innerResponse.getBody().getProperty(PROPERTY_COMP_NAV)
+        .getComplexValue().get(PROPERTY_INT16)
         .getPrimitiveValue().toValue());
   }
 
   @Test
-  public void consistency() throws EdmPrimitiveTypeException {
+  public void consistency() throws Exception {
+    final EdmEnabledODataClient client = getEdmEnabledClient();
+    final ClientObjectFactory factory = getFactory();
     final String cookie = getCookie();
 
     // Do not set PropertyString(Nullable=false)
-    final ClientEntity entity = getFactory().newEntity(ET_KEY_NAV);
+    final ClientEntity entity = factory.newEntity(ET_KEY_NAV);
     entity.getProperties().add(
-        getFactory().newCollectionProperty(COL_PROPERTY_STRING,
-            getFactory().newCollectionValue(EDM_STRING).add(
-                getFactory().newPrimitiveValueBuilder().buildString("Test"))));
+        factory.newCollectionProperty(COL_PROPERTY_STRING,
+            factory.newCollectionValue(EDM_STRING).add(
+                factory.newPrimitiveValueBuilder().buildString("Test"))));
 
-    final URI targetURI = getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build();
+    final URI targetURI = client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build();
 
     try {
-      ODataEntityCreateRequest<ClientEntity> request = getEdmEnabledClient().getCUDRequestFactory()
+      ODataEntityCreateRequest<ClientEntity> request = client.getCUDRequestFactory()
           .getEntityCreateRequest(targetURI, entity);
       request.addCustomHeader(HttpHeader.COOKIE, cookie);
       request.execute();
@@ -623,20 +670,21 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
   }
 
   @Test
-  public void invalidType() throws EdmPrimitiveTypeException {
+  public void invalidType() throws Exception {
+    final EdmEnabledODataClient client = getEdmEnabledClient();
+    final ClientObjectFactory factory = getFactory();
     final String cookie = getCookie();
 
-    final ClientEntity entity = getFactory().newEntity(ET_KEY_NAV);
-    entity.getProperties().add(getFactory().newPrimitiveProperty(PROPERTY_STRING,
-        getFactory().newPrimitiveValueBuilder().buildInt32(1)));
-    final URI targetURI = getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build();
+    final ClientEntity entity = factory.newEntity(ET_KEY_NAV);
+    entity.getProperties().add(factory.newPrimitiveProperty(PROPERTY_STRING, 
+        factory.newPrimitiveValueBuilder().buildInt32(1)));
+    final URI targetURI = client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build();
 
     try {
-      ODataEntityCreateRequest<ClientEntity> request = getEdmEnabledClient().getCUDRequestFactory()
+      ODataEntityCreateRequest<ClientEntity> request = client.getCUDRequestFactory()
           .getEntityCreateRequest(targetURI, entity);
       request.addCustomHeader(HttpHeader.COOKIE, cookie);
       request.execute();
-      fail("Expecting bad request");
     } catch (ODataClientErrorException e) {
       assertEquals(HttpStatusCode.BAD_REQUEST.getStatusCode(), e.getStatusLine().getStatusCode());
     }
@@ -644,16 +692,15 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
     validateSet(targetURI, cookie, (short) 1, (short) 2, (short) 3);
 
     entity.getProperties().add(
-        getFactory().newCollectionProperty(PROPERTY_STRING,
-            getFactory().newCollectionValue(EDM_STRING).add(
-                getFactory().newPrimitiveValueBuilder().buildString("Test"))));
+        factory.newCollectionProperty(PROPERTY_STRING,
+            factory.newCollectionValue(EDM_STRING).add(
+                factory.newPrimitiveValueBuilder().buildString("Test"))));
 
     try {
-      ODataEntityCreateRequest<ClientEntity> request = getEdmEnabledClient().getCUDRequestFactory()
+      ODataEntityCreateRequest<ClientEntity> request = client.getCUDRequestFactory()
           .getEntityCreateRequest(targetURI, entity);
       request.addCustomHeader(HttpHeader.COOKIE, cookie);
       request.execute();
-      fail("Expecting bad request");
     } catch (ODataClientErrorException e) {
       assertEquals(HttpStatusCode.BAD_REQUEST.getStatusCode(), e.getStatusLine().getStatusCode());
     }
@@ -664,40 +711,45 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
   @Test
   @Ignore
   public void deepInsertOnNavigationPropertyInComplexProperty() {
-    final ClientEntity inlineEntity = getFactory().newEntity(ET_TWO_KEY_NAV);
-    inlineEntity.getProperties().add(
-        getFactory().newComplexProperty(PROPERTY_COMP, getFactory().newComplexValue(CT_PRIM_COMP)));
-    inlineEntity.getProperties().add(
-        getFactory().newComplexProperty(PROPERTY_COMP_NAV, getFactory().newComplexValue(CT_BASE_PRIM_COMP_NAV)));
-    inlineEntity.getProperties().add(
-        getFactory().newComplexProperty(PROPERTY_COMP_TWO_PRIM, getFactory().newComplexValue(CT_TWO_PRIM)
-            .add(getFactory().newPrimitiveProperty(PROPERTY_INT16,
-                getFactory().newPrimitiveValueBuilder().buildInt16((short) 1)))
-            .add(getFactory().newPrimitiveProperty(PROPERTY_STRING,
-                getFactory().newPrimitiveValueBuilder().buildString("1")))));
-
-    final ClientEntity entity = getFactory().newEntity(ET_TWO_KEY_NAV);
-    entity.getProperties().add(
-        getFactory().newComplexProperty(PROPERTY_COMP, getFactory().newComplexValue(CT_PRIM_COMP)));
-    entity.getProperties().add(
-        getFactory().newComplexProperty(PROPERTY_COMP_NAV, getFactory().newComplexValue(CT_BASE_PRIM_COMP_NAV)));
-    entity.getProperties().add(
-        getFactory().newComplexProperty(PROPERTY_COMP_TWO_PRIM, getFactory().newComplexValue(CT_TWO_PRIM)
-            .add(getFactory().newPrimitiveProperty(PROPERTY_INT16,
-                getFactory().newPrimitiveValueBuilder().buildInt16((short) 2)))
-            .add(getFactory().newPrimitiveProperty(PROPERTY_STRING,
-                getFactory().newPrimitiveValueBuilder().buildString("2")))));
-
-    final ClientLink link = getFactory().newDeepInsertEntity(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE, inlineEntity);
-    final ClientComplexValue complexValueCreate = getFactory().newComplexValue(CT_NAV_FIVE_PROP);
+    final EdmEnabledODataClient client = getEdmEnabledClient();
+    final ClientObjectFactory factory = getFactory();
+
+    final ClientEntity inlineEntity = factory.newEntity(ET_TWO_KEY_NAV);
+    inlineEntity.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)));
+    inlineEntity.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)));
+    inlineEntity.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 1)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("1")))));
+
+    final ClientEntity entity = factory.newEntity(ET_TWO_KEY_NAV);
+    entity.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)));
+    entity.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_BASE_PRIM_COMP_NAV)));
+    entity.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 2)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("2")))));
+
+    final ClientLink link = factory.newDeepInsertEntity(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE, inlineEntity);
+    final ClientComplexValue complexValueCreate = factory.newComplexValue(CT_NAV_FIVE_PROP);
     complexValueCreate.getNavigationLinks().add(link);
 
-    entity.getProperties().add(
-        getFactory().newCollectionProperty(COL_PROPERTY_COMP_NAV, getFactory().newCollectionValue(CT_NAV_FIVE_PROP)
-            .add(complexValueCreate)));
+    entity.getProperties()
+        .add(factory.newCollectionProperty(COL_PROPERTY_COMP_NAV,
+            factory.newCollectionValue(CT_NAV_FIVE_PROP).add(complexValueCreate)));
 
-    final URI targetURI = getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).build();
-    final ODataEntityCreateResponse<ClientEntity> response = getEdmEnabledClient().getCUDRequestFactory()
+    final URI targetURI = client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).build();
+    final ODataEntityCreateResponse<ClientEntity> response = client.getCUDRequestFactory()
         .getEntityCreateRequest(targetURI, entity)
         .execute();
 
@@ -720,7 +772,8 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
 
   @Test
   public void deepUpsert() {
-    final URI updateURI = getClient().newURIBuilder(SERVICE_URI)
+    final ODataClient client = getEdmEnabledClient();
+    final URI updateURI = client.newURIBuilder(SERVICE_URI)
         .appendEntitySetSegment(ES_KEY_NAV)
         .appendKeySegment(815)
         .build();
@@ -729,51 +782,58 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
 
     // Prepare entity(EntitySet: ESKeyNav, Type: ETKeyNav)
     entity.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short)
-            42)));
+        .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 42)));
     entity.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")));
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_NAV_FIVE_PROP)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_NAV_FIVE_PROP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                     factory.newPrimitiveValueBuilder().buildInt16((short) 42)))));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_ALL_PRIM, factory.newComplexValue(CT_ALL_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")))));
+        .add(factory.newComplexProperty(PROPERTY_COMP_ALL_PRIM,
+            factory.newComplexValue(CT_ALL_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("42")))));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16
-                    ((short)
-                    42)))
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("42")))));
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 42)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("42")))));
     entity.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_COMP_NAV, factory.newComplexValue(CT_PRIM_COMP)
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder()
-                    .buildString("42")))
-            .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_NAV_FIVE_PROP)
-                    .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_COMP_NAV,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("42")))
+                .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+                    factory.newComplexValue(CT_NAV_FIVE_PROP)
+                        .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                             factory.newPrimitiveValueBuilder().buildInt16((short) 42)))))));
 
     // Non collection navigation property
     // Create related entity(EntitySet: ESTwoKeyNav, Type: ETTwoKeyNav, Nav. Property: NavPropertyETTwoKeyNavOne)
     final ClientEntity inlineEntitySingle = factory.newEntity(ET_TWO_KEY_NAV);
     inlineEntitySingle.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 43)));
+        .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 43)));
     inlineEntitySingle.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("43")));
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("43")));
     inlineEntitySingle.getProperties().add(factory.newComplexProperty(PROPERTY_COMP,
-            factory.newComplexValue(CT_PRIM_COMP)
-                    .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                            factory.newPrimitiveValueBuilder().buildInt16((short) 43)))));
-    inlineEntitySingle.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_PRIM_COMP)
+        factory.newComplexValue(CT_PRIM_COMP)
             .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                factory.newPrimitiveValueBuilder().buildInt16((short) 43)))));
+    inlineEntitySingle.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                     factory.newPrimitiveValueBuilder().buildInt16((short) 431)))));
     inlineEntitySingle.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16
-                    ((short) 432)))
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 432)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
                     factory.newPrimitiveValueBuilder().buildString("432")))));
 
     // Collection navigation property
@@ -781,44 +841,51 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
     // Create related entity(EntitySet: ESTwoKeyNav, Type: NavPropertyETTwoKeyNavMany
     final ClientEntity inlineEntityCol1 = factory.newEntity(ET_TWO_KEY_NAV);
     inlineEntityCol1.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 44)));
+        .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short) 44)));
     inlineEntityCol1.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("44")));
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("44")));
     inlineEntityCol1.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_PRIM_COMP)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                     factory.newPrimitiveValueBuilder().buildInt16((short) 441)))));
-    inlineEntityCol1.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)
+    inlineEntityCol1.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP,
+            factory.newComplexValue(CT_PRIM_COMP)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 441)))));
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 441)))));
     inlineEntityCol1.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16
-                    ((short) 442)))
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("442"))
-            )));
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 442)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("442")))));
 
     final ClientEntity inlineEntityCol2 = factory.newEntity(ET_TWO_KEY_NAV);
     inlineEntityCol2.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16((short)
-            45)));
+        .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+            factory.newPrimitiveValueBuilder().buildInt16((short) 45)));
     inlineEntityCol2.getProperties()
-    .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder().buildString("45")));
+        .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+            factory.newPrimitiveValueBuilder().buildString("45")));
     inlineEntityCol2.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_NAV, factory.newComplexValue(CT_PRIM_COMP)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+        .add(factory.newComplexProperty(PROPERTY_COMP_NAV,
+            factory.newComplexValue(CT_PRIM_COMP)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
                     factory.newPrimitiveValueBuilder().buildInt16((short) 451)))));
-    inlineEntityCol2.getProperties().add(
-        factory.newComplexProperty(PROPERTY_COMP, factory.newComplexValue(CT_PRIM_COMP)
+    inlineEntityCol2.getProperties()
+        .add(factory.newComplexProperty(PROPERTY_COMP,
+            factory.newComplexValue(CT_PRIM_COMP)
                 .add(factory.newPrimitiveProperty(PROPERTY_INT16,
-                        factory.newPrimitiveValueBuilder().buildInt16((short) 451)))));
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 451)))));
     inlineEntityCol2.getProperties()
-    .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM, factory.newComplexValue(CT_TWO_PRIM)
-            .add(factory.newPrimitiveProperty(PROPERTY_INT16, factory.newPrimitiveValueBuilder().buildInt16
-                    ((short) 452)))
-            .add(factory.newPrimitiveProperty(PROPERTY_STRING, factory.newPrimitiveValueBuilder()
-                    .buildString("452")))));
+        .add(factory.newComplexProperty(PROPERTY_COMP_TWO_PRIM,
+            factory.newComplexValue(CT_TWO_PRIM)
+                .add(factory.newPrimitiveProperty(PROPERTY_INT16,
+                    factory.newPrimitiveValueBuilder().buildInt16((short) 452)))
+                .add(factory.newPrimitiveProperty(PROPERTY_STRING,
+                    factory.newPrimitiveValueBuilder().buildString("452")))));
 
     final ClientInlineEntity newDeepInsertEntityLink =
         factory.newDeepInsertEntity(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE, inlineEntitySingle);
@@ -832,7 +899,7 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
     entity.addLink(newDeepInsertEntitySetLink);
 
     // Perform update request (upsert)
-    final ODataEntityUpdateResponse<ClientEntity> responseCreate = getClient().getCUDRequestFactory()
+    final ODataEntityUpdateResponse<ClientEntity> responseCreate = client.getCUDRequestFactory()
         .getEntityUpdateRequest(updateURI, UpdateType.PATCH, entity)
         .execute();
     assertEquals(HttpStatusCode.CREATED.getStatusCode(), responseCreate.getStatusCode());
@@ -842,109 +909,115 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
     // Fetch ESKeyNav entity with expand of NavPropertyETTwoKeyNavOne nav. property
     ClientProperty propertyInt16 = responseCreate.getBody().getProperty(PROPERTY_INT16);
     final URI esKeyNavURI =
-        getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).appendKeySegment(
             propertyInt16.getPrimitiveValue().toValue()).expand(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE,
                 NAV_PROPERTY_ET_TWO_KEY_NAV_MANY).build();
 
-    final ODataEntityRequest<ClientEntity> esKeyNavRequest = getClient().getRetrieveRequestFactory()
+    final ODataEntityRequest<ClientEntity> esKeyNavRequest = client.getRetrieveRequestFactory()
         .getEntityRequest(esKeyNavURI);
     esKeyNavRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
     final ODataRetrieveResponse<ClientEntity> esKeyNavResponse = esKeyNavRequest.execute();
 
     // Check nav. property NavPropertyETTwoKeyNavOne
-    assertNotNull(esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE));
-    assertEquals(431, esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE).getComplexValue().get(
-        PROPERTY_COMP_NAV).getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertNotNull(esKeyNavResponse.getBody().getNavigationLink(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE));
+    ClientInlineEntity navOne = (ClientInlineEntity)esKeyNavResponse.getBody()
+        .getNavigationLink(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE);
+    assertShortOrInt(431, navOne.getEntity().getProperty(PROPERTY_COMP_NAV).getComplexValue()
+        .get(PROPERTY_INT16).getPrimitiveValue().toValue());
 
     // Check nav. property NavPropertyETTwoKeyNavMany
-    assertNotNull(esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY));
-    assertEquals(2, esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY).getCollectionValue()
-        .size());
-    Iterator<ClientValue> twoKeyNavManyIterator =
-        esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY).getCollectionValue().iterator();
-    final ClientValue firstTwoKeyNavEnity = twoKeyNavManyIterator.next(); // First entity
-    assertEquals(441, firstTwoKeyNavEnity.asComplex().get(PROPERTY_COMP_NAV).getValue().asComplex().get(
-        PROPERTY_INT16).getPrimitiveValue().toValue());
-    final ClientValue secondTwoKeyNavEnity = twoKeyNavManyIterator.next(); // Second entity
-    assertEquals(451, secondTwoKeyNavEnity.asComplex().get(PROPERTY_COMP_NAV).getValue().asComplex().get(
-        PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertNotNull(esKeyNavResponse.getBody().getNavigationLink(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY));
+    ClientInlineEntitySet navMany = (ClientInlineEntitySet)esKeyNavResponse.getBody()
+        .getNavigationLink(NAV_PROPERTY_ET_TWO_KEY_NAV_MANY);
+    assertEquals(2, navMany.getEntitySet().getEntities().size());
+
+    assertShortOrInt(441, navMany.getEntitySet().getEntities().get(0).getProperty(PROPERTY_COMP_NAV).getValue()
+        .asComplex().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    
+    assertShortOrInt(451, navMany.getEntitySet().getEntities().get(1).getProperty(PROPERTY_COMP_NAV).getValue()
+        .asComplex().get(PROPERTY_INT16).getPrimitiveValue().toValue());
 
     // Fetch ESTwoKeyNav entities and check if available and the partner relation have been set up
     // Check ESTwoKeyNav(Created via NavPropertyETTwoKeyNavOne)
     Map<String, Object> composedKey = new HashMap<String, Object>();
-    composedKey.put(PROPERTY_INT16, esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE)
-        .getComplexValue().get(PROPERTY_INT16)
+    composedKey.put(PROPERTY_INT16, navOne.getEntity().getProperty(PROPERTY_INT16)
         .getPrimitiveValue().toValue());
-    composedKey.put(PROPERTY_STRING, esKeyNavResponse.getBody().getProperty(NAV_PROPERTY_ET_TWO_KEY_NAV_ONE)
-        .getComplexValue().get(PROPERTY_STRING)
+    composedKey.put(PROPERTY_STRING,  navOne.getEntity().getProperty(PROPERTY_STRING)
         .getPrimitiveValue().toValue());
 
-    final URI esTwoKeyNavEntitySingleURI = getClient().newURIBuilder(SERVICE_URI)
+    final URI esTwoKeyNavEntitySingleURI = client.newURIBuilder(SERVICE_URI)
         .appendEntitySetSegment(ES_TWO_KEY_NAV)
         .appendKeySegment(composedKey)
         .build();
 
-    final ODataEntityRequest<ClientEntity> esTwoKeyNavSingleRequest = getClient().getRetrieveRequestFactory()
+    final ODataEntityRequest<ClientEntity> esTwoKeyNavSingleRequest = client.getRetrieveRequestFactory()
         .getEntityRequest(esTwoKeyNavEntitySingleURI);
     esTwoKeyNavSingleRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
     final ODataRetrieveResponse<ClientEntity> esTwoKeyNavSingleResponse = esTwoKeyNavSingleRequest.execute();
-    assertEquals(431, esTwoKeyNavSingleResponse.getBody().getProperty(PROPERTY_COMP_NAV).getComplexValue().get(
-        PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertShortOrInt(431, esTwoKeyNavSingleResponse.getBody().getProperty(PROPERTY_COMP_NAV)
+        .getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
 
     // Check ESTwoKeyNav(Created via NavPropertyETTwoKeyNavMany(0))
     composedKey.clear();
-    composedKey.put(PROPERTY_INT16, firstTwoKeyNavEnity.asComplex().get(PROPERTY_INT16).getPrimitiveValue().toValue());
-    composedKey.put(PROPERTY_STRING, firstTwoKeyNavEnity.asComplex().get(PROPERTY_STRING).getPrimitiveValue()
-        .toValue());
+    composedKey.put(PROPERTY_INT16, navMany.getEntitySet().getEntities().get(0)
+        .getProperty(PROPERTY_INT16).getPrimitiveValue().toValue());
+    composedKey.put(PROPERTY_STRING,navMany.getEntitySet().getEntities().get(0)
+        .getProperty(PROPERTY_STRING).getPrimitiveValue().toValue());
 
     URI esTwoKeyNavEntityManyOneURI =
-        getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(composedKey)
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(composedKey)
         .expand(NAV_PROPERTY_ET_KEY_NAV_ONE).build();
 
     final ODataEntityRequest<ClientEntity> esTwoKeyNavManyOneRequest =
-        getClient().getRetrieveRequestFactory().getEntityRequest(esTwoKeyNavEntityManyOneURI);
+        client.getRetrieveRequestFactory().getEntityRequest(esTwoKeyNavEntityManyOneURI);
     esTwoKeyNavManyOneRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
     final ODataRetrieveResponse<ClientEntity> esTwoKeyNavManyOneResponse = esTwoKeyNavManyOneRequest.execute();
 
-    assertEquals(441, esTwoKeyNavManyOneResponse.getBody().getProperty(PROPERTY_COMP_NAV).getComplexValue().get(
-        PROPERTY_INT16).getPrimitiveValue().toValue());
-    assertNotNull(esTwoKeyNavManyOneResponse.getBody().getProperty(NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue());
-    assertEquals(propertyInt16.getPrimitiveValue().toValue(), esTwoKeyNavManyOneResponse.getBody().getProperty(
-        NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertShortOrInt(441, esTwoKeyNavManyOneResponse.getBody().getProperty(PROPERTY_COMP_NAV)
+        .getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertNotNull(esTwoKeyNavManyOneResponse.getBody().getNavigationLink(NAV_PROPERTY_ET_KEY_NAV_ONE));
+    ClientInlineEntity nvLink = (ClientInlineEntity)esTwoKeyNavManyOneResponse.getBody()
+        .getNavigationLink(NAV_PROPERTY_ET_KEY_NAV_ONE); 
+    assertEquals(propertyInt16.getPrimitiveValue().toValue(), nvLink.getEntity().getProperty(PROPERTY_INT16)
+        .getPrimitiveValue().toValue());
 
     // Check ESTwoKeyNav(Created via NavPropertyETTwoKeyNavMany(1))
     composedKey.clear();
-    composedKey.put(PROPERTY_INT16, secondTwoKeyNavEnity.asComplex().get(PROPERTY_INT16).getPrimitiveValue().toValue());
-    composedKey.put(PROPERTY_STRING, secondTwoKeyNavEnity.asComplex().get(PROPERTY_STRING).getPrimitiveValue()
-        .toValue());
+    composedKey.put(PROPERTY_INT16, navMany.getEntitySet().getEntities().get(1)
+        .getProperty(PROPERTY_INT16).getPrimitiveValue().toValue());
+    composedKey.put(PROPERTY_STRING,navMany.getEntitySet().getEntities().get(1)
+        .getProperty(PROPERTY_STRING).getPrimitiveValue().toValue());
 
     URI esTwoKeyNavEntityManyTwoURI =
-        getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(composedKey)
+        client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_TWO_KEY_NAV).appendKeySegment(composedKey)
         .expand(NAV_PROPERTY_ET_KEY_NAV_ONE).build();
 
     final ODataEntityRequest<ClientEntity> esTwoKeyNavManyTwoRequest =
-        getClient().getRetrieveRequestFactory().getEntityRequest(esTwoKeyNavEntityManyTwoURI);
+        client.getRetrieveRequestFactory().getEntityRequest(esTwoKeyNavEntityManyTwoURI);
     esTwoKeyNavManyTwoRequest.addCustomHeader(HttpHeader.COOKIE, cookie);
     final ODataRetrieveResponse<ClientEntity> esTwoKeyNavManyTwoResponse = esTwoKeyNavManyTwoRequest.execute();
 
-    assertEquals(451, esTwoKeyNavManyTwoResponse.getBody().getProperty(PROPERTY_COMP_NAV).getComplexValue().get(
-        PROPERTY_INT16).getPrimitiveValue().toValue());
-    assertNotNull(esTwoKeyNavManyTwoResponse.getBody().getProperty(NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue());
-    assertEquals(propertyInt16.getPrimitiveValue().toValue(), esTwoKeyNavManyTwoResponse.getBody().getProperty(
-        NAV_PROPERTY_ET_KEY_NAV_ONE).getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
-
+    assertShortOrInt(451, esTwoKeyNavManyTwoResponse.getBody().getProperty(PROPERTY_COMP_NAV)
+        .getComplexValue().get(PROPERTY_INT16).getPrimitiveValue().toValue());
+    assertNotNull(esTwoKeyNavManyTwoResponse.getBody().getNavigationLink(NAV_PROPERTY_ET_KEY_NAV_ONE));
+    nvLink = (ClientInlineEntity)esTwoKeyNavManyTwoResponse.getBody()
+        .getNavigationLink(NAV_PROPERTY_ET_KEY_NAV_ONE);
+    assertEquals(propertyInt16.getPrimitiveValue().toValue(),nvLink.getEntity()
+        .getProperty(PROPERTY_INT16).getPrimitiveValue().toValue());
   }
 
   private String getCookie() {
-    final ODataRetrieveResponse<ClientEntitySet> response = getEdmEnabledClient().getRetrieveRequestFactory()
-        .getEntitySetRequest(getClient().newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build())
+    final EdmEnabledODataClient client = getEdmEnabledClient();
+    final ODataRetrieveResponse<ClientEntitySet> response = client.getRetrieveRequestFactory()
+        .getEntitySetRequest(client.newURIBuilder(SERVICE_URI).appendEntitySetSegment(ES_KEY_NAV).build())
         .execute();
 
     return response.getHeader(HttpHeader.SET_COOKIE).iterator().next();
   }
 
   private void validateSet(final URI uri, final String cookie, final short... keys) throws EdmPrimitiveTypeException {
-    final ODataEntitySetRequest<ClientEntitySet> request = getEdmEnabledClient().getRetrieveRequestFactory()
+    final EdmEnabledODataClient client = getEdmEnabledClient();
+    final ODataEntitySetRequest<ClientEntitySet> request = client.getRetrieveRequestFactory()
         .getEntitySetRequest(uri);
     request.addCustomHeader(HttpHeader.COOKIE, cookie);
     final ODataRetrieveResponse<ClientEntitySet> response = request.execute();
@@ -953,7 +1026,8 @@ public class DeepInsertITCase extends AbstractTecSvcITCase {
     assertEquals(3, response.getBody().getEntities().size());
 
     for (final ClientEntity responseEntity : response.getBody().getEntities()) {
-      short propertyInt16 = responseEntity.getProperty(PROPERTY_INT16).getPrimitiveValue().toCastValue(Short.class);
+      short propertyInt16 = responseEntity.getProperty(PROPERTY_INT16)
+          .getPrimitiveValue().toCastValue(Short.class);
 
       boolean found = false;
       for (int i = 0; i < keys.length && !found; i++) {


Mime
View raw message