You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/03/11 13:53:07 UTC

[05/11] [OLINGO-200] V3 (de)serializers + unit tests merged

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java
new file mode 100644
index 0000000..c4cdc02
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/ErrorTest.java
@@ -0,0 +1,74 @@
+/*
+ * 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.client.core.v3;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.data.Error;
+import org.apache.olingo.client.api.format.ODataPubFormat;
+import org.apache.olingo.client.core.AbstractTest;
+import org.junit.Test;
+
+public class ErrorTest extends AbstractTest {
+
+  @Override
+  protected ODataV3Client getClient() {
+    return v3Client;
+  }
+
+  private Error error(final String name, final ODataPubFormat format) {
+    final Error error = getClient().getDeserializer().toError(
+            getClass().getResourceAsStream(name + "." + getSuffix(format)), format == ODataPubFormat.ATOM);
+    assertNotNull(error);
+    return error;
+  }
+
+  private void simple(final ODataPubFormat format) {
+    final Error error = error("error", format);
+    assertNull(error.getInnerErrorStacktrace());
+  }
+
+  @Test
+  public void jsonSimple() {
+    simple(ODataPubFormat.JSON);
+  }
+
+  @Test
+  public void atomSimple() {
+    simple(ODataPubFormat.ATOM);
+  }
+
+  private void stacktrace(final ODataPubFormat format) {
+    final Error error = error("stacktrace", format);
+    assertNotNull(error.getInnerErrorStacktrace());
+  }
+
+  @Test
+  public void jsonStacktrace() {
+    stacktrace(ODataPubFormat.JSON);
+  }
+
+  @Test
+  public void atomStacktrace() {
+    stacktrace(ODataPubFormat.ATOM);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java
new file mode 100644
index 0000000..c027e40
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v3/PrimitiveValueTest.java
@@ -0,0 +1,554 @@
+/*
+ * 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.client.core.v3;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.UUID;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.olingo.client.api.ODataV3Client;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.ODataDuration;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataTimestamp;
+import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.client.api.domain.geospatial.Geospatial;
+import org.apache.olingo.client.api.domain.geospatial.GeospatialCollection;
+import org.apache.olingo.client.api.domain.geospatial.LineString;
+import org.apache.olingo.client.api.domain.geospatial.MultiLineString;
+import org.apache.olingo.client.api.domain.geospatial.MultiPoint;
+import org.apache.olingo.client.api.domain.geospatial.MultiPolygon;
+import org.apache.olingo.client.api.domain.geospatial.Point;
+import org.apache.olingo.client.api.domain.geospatial.Polygon;
+import org.apache.olingo.client.core.AbstractTest;
+import org.apache.olingo.client.core.ODataClientFactory;
+import org.junit.Test;
+
+public class PrimitiveValueTest extends AbstractTest {
+
+  @Override
+  protected ODataV3Client getClient() {
+    return v3Client;
+  }
+
+  @Test
+  public void manageInt32() {
+    final int primitive = -10;
+    ODataValue value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Int32).
+            setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.Int32.toString(), value.asPrimitive().getTypeName());
+    assertEquals(Integer.valueOf(primitive), value.asPrimitive().<Integer>toCastValue());
+
+    value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Int32).setText("9").build();
+    assertEquals("9", value.asPrimitive().<Integer>toCastValue().toString());
+  }
+
+  @Test
+  public void manageString() {
+    final String primitive = UUID.randomUUID().toString();
+    ODataValue value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.String).
+            setText(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.String.toString(), value.asPrimitive().getTypeName());
+    assertEquals(primitive, value.toString());
+
+    value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.String).
+            setText("1126a28b-a4af-4bbd-bf0a-2b2c22635565").build();
+    assertEquals("1126a28b-a4af-4bbd-bf0a-2b2c22635565", value.asPrimitive().<String>toCastValue().toString());
+  }
+
+  @Test
+  public void manageDecimal() {
+    final BigDecimal primitive = new BigDecimal("-79228162514264337593543950335");
+    ODataValue value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Decimal).
+            setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.Decimal.toString(), value.asPrimitive().getTypeName());
+    assertEquals(primitive, value.asPrimitive().<BigDecimal>toCastValue());
+
+    value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Decimal).
+            setText("-79228162514264337593543950335").build();
+    assertEquals("-79228162514264337593543950335", value.asPrimitive().<BigDecimal>toCastValue().toString());
+  }
+
+  @Test
+  public void manageDateTime() {
+    // OData V3 only
+    final String primitive = "2013-01-10T06:27:51.1667673";
+    try {
+      new ODataPrimitiveValue.Builder(ODataClientFactory.getV4()).
+              setType(ODataJClientEdmPrimitiveType.DateTime).setText(primitive).build();
+      fail();
+    } catch (IllegalArgumentException iae) {
+      // ignore
+    }
+    final ODataValue value =
+            getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.DateTime).
+            setText(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.DateTime.toString(), value.asPrimitive().getTypeName());
+    // performed cast to improve the check
+    assertEquals(primitive, value.asPrimitive().<ODataTimestamp>toCastValue().toString());
+  }
+
+  @Test
+  public void manageTime() {
+    // OData V3 only
+    final String primitive = "-P9DT51M10.5063807S";
+    try {
+      new ODataPrimitiveValue.Builder(ODataClientFactory.getV4()).
+              setType(ODataJClientEdmPrimitiveType.Time).setText(primitive).build();
+      fail();
+    } catch (IllegalArgumentException iae) {
+      // ignore
+    }
+
+    final ODataValue value =
+            getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Time).
+            setText(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.Time.toString(), value.asPrimitive().getTypeName());
+    // performed cast to improve the check
+    assertEquals(primitive, value.asPrimitive().<ODataDuration>toCastValue().toString());
+  }
+
+  @Test
+  public void manageDateTimeOffset() {
+    final String primitive = "2013-01-10T02:00:00";
+    final ODataValue value = getClient().getPrimitiveValueBuilder().
+            setType(ODataJClientEdmPrimitiveType.DateTimeOffset).setText(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.DateTimeOffset.toString(), value.asPrimitive().getTypeName());
+    // performed cast to improve the check
+    assertEquals(primitive, value.asPrimitive().<ODataTimestamp>toCastValue().toString());
+  }
+
+  @Test
+  public void manageGuid() {
+    final UUID primitive = UUID.fromString("1126a28b-a4af-4bbd-bf0a-2b2c22635565");
+    ODataValue value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Guid).
+            setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.Guid.toString(), value.asPrimitive().getTypeName());
+    assertEquals(primitive, value.asPrimitive().<UUID>toCastValue());
+
+    value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Guid).
+            setText("1126a28b-a4af-4bbd-bf0a-2b2c22635565").build();
+    assertEquals("1126a28b-a4af-4bbd-bf0a-2b2c22635565", value.asPrimitive().<UUID>toCastValue().toString());
+  }
+
+  @Test
+  public void manageBinary() {
+    final byte[] primitive = UUID.randomUUID().toString().getBytes();
+    ODataValue value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Binary).
+            setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.Binary.toString(), value.asPrimitive().getTypeName());
+    assertEquals(
+            Base64.encodeBase64String(primitive),
+            Base64.encodeBase64String(value.asPrimitive().<byte[]>toCastValue()));
+
+    value = getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.Binary).
+            setText(Base64.encodeBase64String("primitive".getBytes())).build();
+    assertEquals("primitive", new String(value.asPrimitive().<byte[]>toCastValue()));
+  }
+
+  @Test
+  public void managePoint() {
+    final Point primitive = new Point(Geospatial.Dimension.GEOGRAPHY);
+    primitive.setX(52.8606);
+    primitive.setY(173.334);
+
+    try {
+      getClient().getPrimitiveValueBuilder().setType(ODataJClientEdmPrimitiveType.GeographyPoint).
+              setValue(primitive).build();
+      fail();
+    } catch (IllegalArgumentException iae) {
+      // nothing top do
+    }
+
+    final ODataValue value =
+            getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeographyPoint).
+            setValue(primitive).
+            build();
+    assertEquals(ODataJClientEdmPrimitiveType.GeographyPoint.toString(), value.asPrimitive().getTypeName());
+    assertEquals(Double.valueOf(primitive.getX()), Double.valueOf(value.asPrimitive().<Point>toCastValue().getX()));
+    assertEquals(Double.valueOf(primitive.getY()), Double.valueOf(value.asPrimitive().<Point>toCastValue().getY()));
+  }
+
+  @Test
+  public void manageLineString() {
+    final List<Point> points = new ArrayList<Point>();
+    Point point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(40.5);
+    point.setY(40.5);
+    points.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(30.5);
+    point.setY(30.5);
+    points.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(20.5);
+    point.setY(40.5);
+    points.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(10.5);
+    point.setY(30.5);
+    points.add(point);
+
+    final LineString primitive = new LineString(Geospatial.Dimension.GEOGRAPHY, points);
+
+    final ODataValue value = getClient().getGeospatialValueBuilder().
+            setType(ODataJClientEdmPrimitiveType.GeographyLineString).setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.GeographyLineString.toString(), value.asPrimitive().getTypeName());
+
+    final Iterator<Point> iter = value.asPrimitive().<LineString>toCastValue().iterator();
+
+    // take the third one and check the point value ...
+    iter.next();
+    iter.next();
+    point = iter.next();
+
+    assertEquals(Double.valueOf(points.get(2).getX()), Double.valueOf(point.getX()));
+    assertEquals(Double.valueOf(points.get(2).getY()), Double.valueOf(point.getY()));
+  }
+
+  @Test
+  public void manageMultiPoint() {
+    final List<Point> points = new ArrayList<Point>();
+    Point point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(0);
+    point.setY(0);
+    points.add(point);
+
+    final MultiPoint primitive = new MultiPoint(Geospatial.Dimension.GEOMETRY, points);
+
+    final ODataValue value = getClient().getGeospatialValueBuilder().
+            setType(ODataJClientEdmPrimitiveType.GeometryMultiPoint).setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.GeometryMultiPoint.toString(), value.asPrimitive().getTypeName());
+
+    final Iterator<Point> iter = value.asPrimitive().<MultiPoint>toCastValue().iterator();
+    point = iter.next();
+
+    assertEquals(Double.valueOf(points.get(0).getX()), Double.valueOf(point.getX()));
+    assertEquals(Double.valueOf(points.get(0).getY()), Double.valueOf(point.getY()));
+  }
+
+  @Test
+  public void manageMultiLine() {
+    final List<LineString> lines = new ArrayList<LineString>();
+
+    // line one ...
+    List<Point> points = new ArrayList<Point>();
+    Point point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(10);
+    point.setY(10);
+    points.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(20);
+    point.setY(20);
+    points.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(10);
+    point.setY(40);
+    points.add(point);
+
+    lines.add(new LineString(Geospatial.Dimension.GEOMETRY, points));
+
+    // line two ...
+    points = new ArrayList<Point>();
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(40);
+    point.setY(40);
+    points.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(30);
+    point.setY(30);
+    points.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(40);
+    point.setY(20);
+    points.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(30);
+    point.setY(10);
+    points.add(point);
+    lines.add(new LineString(Geospatial.Dimension.GEOMETRY, points));
+
+    final MultiLineString primitive = new MultiLineString(Geospatial.Dimension.GEOMETRY, lines);
+
+    final ODataValue value =
+            getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeometryMultiLineString).
+            setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.GeometryMultiLineString.toString(), value.asPrimitive().getTypeName());
+
+    final Iterator<LineString> lineIter = value.asPrimitive().<MultiLineString>toCastValue().iterator();
+
+    // take the second line and check the third point value ...
+    lineIter.next();
+    final LineString line = lineIter.next();
+
+    final Iterator<Point> pointIter = line.iterator();
+    pointIter.next();
+    pointIter.next();
+    point = pointIter.next();
+
+    assertEquals(Double.valueOf(points.get(2).getX()), Double.valueOf(point.getX()));
+    assertEquals(Double.valueOf(points.get(2).getY()), Double.valueOf(point.getY()));
+  }
+
+  @Test
+  public void managePolygon() {
+
+    final List<Point> interior = new ArrayList<Point>();
+    final List<Point> exterior = new ArrayList<Point>();
+
+    Point point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(5);
+    point.setY(15);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(10);
+    point.setY(40);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(20);
+    point.setY(10);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(10);
+    point.setY(5);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(5);
+    point.setY(15);
+    exterior.add(point);
+
+    final Polygon primitive = new Polygon(Geospatial.Dimension.GEOGRAPHY, interior, exterior);
+
+    final ODataValue value =
+            getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeographyPolygon).
+            setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.GeographyPolygon.toString(), value.asPrimitive().getTypeName());
+
+    assertTrue(value.asPrimitive().<Polygon>toCastValue().getInterior().isEmpty());
+    final Iterator<Point> iter = value.asPrimitive().<Polygon>toCastValue().getExterior().iterator();
+
+    // take the third one ...
+    iter.next();
+    iter.next();
+    point = iter.next();
+
+    assertEquals(Double.valueOf(exterior.get(2).getX()), Double.valueOf(point.getX()));
+    assertEquals(Double.valueOf(exterior.get(2).getY()), Double.valueOf(point.getY()));
+  }
+
+  @Test
+  public void manageMultiPolygon() {
+    final List<Polygon> polygons = new ArrayList<Polygon>();
+
+    List<Point> interior = new ArrayList<Point>();
+    List<Point> exterior = new ArrayList<Point>();
+
+    // exterior one ...
+    Point point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(40);
+    point.setY(40);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(20);
+    point.setY(45);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(45);
+    point.setY(30);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(40);
+    point.setY(40);
+    exterior.add(point);
+
+    polygons.add(new Polygon(Geospatial.Dimension.GEOMETRY, interior, exterior));
+
+    // interior two ...
+    interior = new ArrayList<Point>();
+    exterior = new ArrayList<Point>();
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(30);
+    point.setY(20);
+    interior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(20);
+    point.setY(25);
+    interior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(20);
+    point.setY(15);
+    interior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(30);
+    point.setY(20);
+    interior.add(point);
+
+    // exterior two ...
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(20);
+    point.setY(35);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(45);
+    point.setY(20);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(30);
+    point.setY(5);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(10);
+    point.setY(10);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(10);
+    point.setY(30);
+    exterior.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(20);
+    point.setY(35);
+    exterior.add(point);
+
+    polygons.add(new Polygon(Geospatial.Dimension.GEOMETRY, interior, exterior));
+
+    final MultiPolygon primitive = new MultiPolygon(Geospatial.Dimension.GEOMETRY, polygons);
+
+    final ODataValue value =
+            getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeometryMultiPolygon).
+            setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.GeometryMultiPolygon.toString(), value.asPrimitive().getTypeName());
+
+    final Iterator<Polygon> iter = value.asPrimitive().<MultiPolygon>toCastValue().iterator();
+
+    // second one polygon
+    iter.next();
+    final Polygon polygon = iter.next();
+    Iterator<Point> pointIter = polygon.getInterior().iterator();
+    pointIter.next();
+    point = pointIter.next();
+
+    // check the second point from interior
+    assertEquals(Double.valueOf(interior.get(1).getX()), Double.valueOf(point.getX()));
+    assertEquals(Double.valueOf(interior.get(1).getY()), Double.valueOf(point.getY()));
+
+    pointIter = polygon.getExterior().iterator();
+    pointIter.next();
+    pointIter.next();
+    point = pointIter.next();
+
+    // check the third point from exterior
+    assertEquals(Double.valueOf(exterior.get(2).getX()), Double.valueOf(point.getX()));
+    assertEquals(Double.valueOf(exterior.get(2).getY()), Double.valueOf(point.getY()));
+  }
+
+  @Test
+  public void manageGeomCollection() {
+    final List<Geospatial> collection = new ArrayList<Geospatial>();
+
+    Point point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(1);
+    point.setY(2);
+    point.setZ(3);
+    collection.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOMETRY);
+    point.setX(4);
+    point.setY(5);
+    point.setZ(6);
+    collection.add(point);
+
+    final GeospatialCollection primitive = new GeospatialCollection(Geospatial.Dimension.GEOMETRY, collection);
+
+    final ODataValue value =
+            getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeometryCollection).
+            setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.GeometryCollection.toString(), value.asPrimitive().getTypeName());
+
+    final Iterator<Geospatial> iter = value.asPrimitive().<GeospatialCollection>toCastValue().iterator();
+    iter.next();
+    final Point collectedPoint = (Point) iter.next();
+
+    assertTrue(point.getX() == collectedPoint.getX()
+            && point.getY() == collectedPoint.getY()
+            && point.getZ() == collectedPoint.getZ());
+  }
+
+  @Test
+  public void manageGeogCollection() {
+    final List<Geospatial> collection = new ArrayList<Geospatial>();
+
+    Point point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(1);
+    point.setY(2);
+    point.setZ(3);
+    collection.add(point);
+
+    point = new Point(Geospatial.Dimension.GEOGRAPHY);
+    point.setX(4);
+    point.setY(5);
+    point.setZ(6);
+    collection.add(point);
+
+    final GeospatialCollection primitive = new GeospatialCollection(Geospatial.Dimension.GEOGRAPHY, collection);
+
+    final ODataValue value =
+            getClient().getGeospatialValueBuilder().setType(ODataJClientEdmPrimitiveType.GeographyCollection).
+            setValue(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.GeographyCollection.toString(), value.asPrimitive().getTypeName());
+
+    final Iterator<Geospatial> iter = value.asPrimitive().<GeospatialCollection>toCastValue().iterator();
+    iter.next();
+    final Point collectedPoint = (Point) iter.next();
+
+    assertTrue(point.getX() == collectedPoint.getX()
+            && point.getY() == collectedPoint.getY()
+            && point.getZ() == collectedPoint.getZ());
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
new file mode 100644
index 0000000..6e9b3b2
--- /dev/null
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/v4/PrimitiveValueTest.java
@@ -0,0 +1,78 @@
+/*
+ * 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.client.core.v4;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import org.apache.olingo.client.api.ODataV4Client;
+import org.apache.olingo.client.api.domain.ODataJClientEdmPrimitiveType;
+import org.apache.olingo.client.api.domain.ODataDuration;
+import org.apache.olingo.client.api.domain.ODataPrimitiveValue;
+import org.apache.olingo.client.api.domain.ODataTimestamp;
+import org.apache.olingo.client.api.domain.ODataValue;
+import org.apache.olingo.client.core.AbstractTest;
+import org.apache.olingo.client.core.ODataClientFactory;
+import org.junit.Test;
+
+public class PrimitiveValueTest extends AbstractTest {
+
+  @Override
+  protected ODataV4Client getClient() {
+    return v4Client;
+  }
+
+  @Test
+  public void manageTimeOfDay() {
+    // OData V4 only
+    final String primitive = "-P9DT51M12.5063807S";
+    try {
+      new ODataPrimitiveValue.Builder(ODataClientFactory.getV3()).
+              setType(ODataJClientEdmPrimitiveType.TimeOfDay).setText(primitive).build();
+      fail();
+    } catch (IllegalArgumentException iae) {
+      // ignore
+    }
+
+    final ODataValue value = getClient().getPrimitiveValueBuilder().
+            setType(ODataJClientEdmPrimitiveType.TimeOfDay).setText(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.TimeOfDay.toString(), value.asPrimitive().getTypeName());
+    // performed cast to improve the check
+    assertEquals(primitive, value.asPrimitive().<ODataDuration>toCastValue().toString());
+  }
+
+  @Test
+  public void manageDate() {
+    // OData V4 only
+    final String primitive = "2013-01-10";
+    try {
+      new ODataPrimitiveValue.Builder(ODataClientFactory.getV3()).
+              setType(ODataJClientEdmPrimitiveType.Date).setText(primitive).build();
+      fail();
+    } catch (IllegalArgumentException iae) {
+      // ignore
+    }
+
+    final ODataValue value = getClient().getPrimitiveValueBuilder().
+            setType(ODataJClientEdmPrimitiveType.Date).setText(primitive).build();
+    assertEquals(ODataJClientEdmPrimitiveType.Date.toString(), value.asPrimitive().getTypeName());
+    // performed cast to improve the check
+    assertEquals(primitive, value.asPrimitive().<ODataTimestamp>toCastValue().toString());
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/complexProperty.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/complexProperty.json b/lib/client-core/src/test/resources/complexProperty.json
deleted file mode 100644
index 53af94c..0000000
--- a/lib/client-core/src/test/resources/complexProperty.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-	"Address": {
-		"Street": "Obere Str. 57", 
-		"City": "Berlin", 
-		"Region": null, 
-		"PostalCode": "D-12209"
-	} 
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/fullEntity.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/fullEntity.json b/lib/client-core/src/test/resources/fullEntity.json
deleted file mode 100644
index 4d84995..0000000
--- a/lib/client-core/src/test/resources/fullEntity.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
-	"odata.context": "http://host/service/$metadata#Customers/$entity", 
-	"odata.id": "Customers('ALFKI')",
-	"odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
-	"odata.editLink": "Customers('ALFKI')", 
-	"Orders@odata.navigationLink": "Customers('ALFKI')/Orders", 
-	"Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref", 
-	"ID": "ALFKI",
-	"CompanyName": "Alfreds Futterkiste",
-	"ContactName": "Maria Anders",
-	"ContactTitle": "Sales Representative",
-	"Phone": "030-0074321",
-	"Fax": "030-0076545",
-	"Address": {
-		"Street": "Obere Str. 57",
-		"City": "Berlin",
-		"Region": null,
-		"PostalCode": "D-12209",
-		"Country@odata.navigationLink": "Customers('ALFKI')/Address/Country", 
-		"Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
-	} 
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/fullEntitySet.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/fullEntitySet.json b/lib/client-core/src/test/resources/fullEntitySet.json
deleted file mode 100644
index b3ddf63..0000000
--- a/lib/client-core/src/test/resources/fullEntitySet.json
+++ /dev/null
@@ -1,29 +0,0 @@
-{
-"odata.context": "http://host/service/$metadata#Customers/$entity",     
-"odata.count": 1,
-"value": [
-{
-"odata.context": "http://host/service/$metadata#Customers/$entity", 
-"odata.id": "Customers('ALFKI')",
-"odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
-"odata.editLink": "Customers('ALFKI')", 
-"Orders@odata.navigationLink": "Customers('ALFKI')/Orders", 
-"Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref", 
-"ID": "ALFKI",
-"CompanyName": "Alfreds Futterkiste",
-"ContactName": "Maria Anders",
-"ContactTitle": "Sales Representative",
-"Phone": "030-0074321",
-"Fax": "030-0076545",
-"Address": {
-	"Street": "Obere Str. 57",
-	"City": "Berlin",
-	"Region": null,
-	"PostalCode": "D-12209",
-	"Country@odata.navigationLink": "Customers('ALFKI')/Address/Country", 
-	"Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
-	} 
-}
-],
-"odata.nextLink": "http://host/service/EntitySet?$skiptoken=342r89"
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/fullEntitySetWithTwoEntities.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/fullEntitySetWithTwoEntities.json b/lib/client-core/src/test/resources/fullEntitySetWithTwoEntities.json
deleted file mode 100644
index 96854ac..0000000
--- a/lib/client-core/src/test/resources/fullEntitySetWithTwoEntities.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
-"odata.context": "http://host/service/$metadata#Customers/$entity",     
-"odata.count": 1,
-"value": [
-    {
-        "odata.context": "http://host/service/$metadata#Customers/$entity", 
-        "odata.id": "Customers('ALFKI')",
-        "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
-        "odata.editLink": "Customers('ALFKI')", 
-        "Orders@odata.navigationLink": "Customers('ALFKI')/Orders", 
-        "Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref", 
-        "ID": "ALFKI",
-        "CompanyName": "Alfreds Futterkiste",
-        "ContactName": "Maria Anders",
-        "ContactTitle": "Sales Representative",
-        "Phone": "030-0074321",
-        "Fax": "030-0076545",
-        "Address": {
-        	"Street": "Obere Str. 57",
-        	"City": "Berlin",
-        	"Region": null,
-        	"PostalCode": "D-12209",
-        	"Country@odata.navigationLink": "Customers('ALFKI')/Address/Country", 
-        	"Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
-        	} 
-    },
-    {
-        "odata.context": "http://host/service/$metadata#Customers/$entity", 
-        "odata.id": "Customers('MUSKI')",
-        "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
-        "odata.editLink": "Customers('MUSKI')", 
-        "Orders@odata.navigationLink": "Customers('MUSKI')/Orders", 
-        "Orders@odata.associationLink": "Customers('MUSKI')/Orders/$ref", 
-        "ID": "MUSKI",
-        "CompanyName": "Mustermanns Futterkiste",
-        "ContactName": "Mustermann Max",
-        "ContactTitle": "Some Guy",
-        "Phone": "030-002222",
-        "Fax": "030-004444",
-        "Address": {
-            "Street": "Musterstrasse 42",
-            "City": "Musterstadt",
-            "Region": "SomeRegion",
-            "PostalCode": "D-42042"
-            } 
-    }
-],
-"odata.nextLink": "http://host/service/EntitySet?$skiptoken=342r89"
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/fullEntityWithCollectionOfComplexValues.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/fullEntityWithCollectionOfComplexValues.json b/lib/client-core/src/test/resources/fullEntityWithCollectionOfComplexValues.json
deleted file mode 100644
index cbdfd1c..0000000
--- a/lib/client-core/src/test/resources/fullEntityWithCollectionOfComplexValues.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
-	"odata.context": "http://host/service/$metadata#Customers/$entity", 
-	"odata.id": "Customers('ALFKI')",
-	"odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
-	"odata.editLink": "Customers('ALFKI')", 
-	"Orders@odata.navigationLink": "Customers('ALFKI')/Orders", 
-	"Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref", 
-	"ID": "ALFKI",
-	"CompanyName": "Alfreds Futterkiste",
-	"ContactName": "Maria Anders",
-	"ContactTitle": "Sales Representative",
-	"Phone": "030-0074321",
-	"Fax": "030-0076545",
-	"Address": [ {
-    		"Street": "Obere Str. 57",
-    		"City": "Berlin",
-    		"Region": null,
-    		"PostalCode": "D-12209",
-    		"Country@odata.navigationLink": "Customers('ALFKI')/Address/Country", 
-    		"Country@odata.associationLink":"Customers('ALFKI')/Address/Country/$ref"
-    	}, {
-            "Street": "Musterstrasse 42",
-            "City": "Musterstadt",
-            "Region": "SomeRegion",
-            "PostalCode": "D-42042"
-        }
-    ]
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/minimalEntity.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/minimalEntity.json b/lib/client-core/src/test/resources/minimalEntity.json
deleted file mode 100644
index a6bd671..0000000
--- a/lib/client-core/src/test/resources/minimalEntity.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
-  "odata.context": "http://host/service/$metadata#Customers/$entity", "odata.id": "Customers('ALFKI')",
-  "odata.etag": "W/\"MjAxMy0wNS0yN1QxMTo1OFo=\"",
-  "odata.editLink": "Customers('ALFKI')",
-  "Orders@odata.navigationLink": "Customers('ALFKI')/Orders",
-  "Orders@odata.associationLink": "Customers('ALFKI')/Orders/$ref",
-  "ID": "ALFKI",
-  "CompanyName": "Alfreds Futterkiste",
-  "ContactName": "Maria Anders",
-  "ContactTitle": "Sales Representative",
-  "Phone": "030-0074321",
-  "Fax": "030-0076545",
-  "Address": {
-    "Street": "Obere Str. 57",
-    "City": "Berlin",
-    "Region": null,
-    "PostalCode": "D-12209",
-    "Country@odata.navigationLink": "Customers('ALFKI')/Address/Country", 
-    "Country@odata.associationLink": "Customers('ALFKI')/Address/Country/$ref"
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.json
new file mode 100644
index 0000000..8e18317
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.0.160:8080/DefaultService.svc/$metadata#Edm.GeometryLineString","value":{"type":"LineString","coordinates":[[1.0,1.0],[3.0,3.0],[2.0,4.0],[2.0,0.0]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}}}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml
new file mode 100644
index 0000000..e103b35
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-10_Geom.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<d:Geom xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml" m:type="Edm.GeometryLineString"><gml:LineString gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>1 1</gml:pos><gml:pos>3 3</gml:pos><gml:pos>2 4</gml:pos><gml:pos>2 0</gml:pos></gml:LineString></d:Geom>

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.json
new file mode 100644
index 0000000..a5bbb8f
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.0.160:8080/DefaultService.svc/$metadata#AllGeoTypesSet/@Element","odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialTypes","odata.id":"http://192.168.0.160:8080/DefaultService.svc/AllGeoTypesSet(-5)","odata.editLink":"AllGeoTypesSet(-5)","Id":-5,"Geog@odata.type":"Edm.Geography","Geog":{"type":"GeometryCollection","geometries":[],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogPoint":null,"GeogLine@odata.type":"Edm.GeographyLineString","GeogLine":{"type":"LineString","coordinates":[[10.5,10.5],[20.5,20.5],[10.5,40.5]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogPolygon@odata.type":"Edm.GeographyPolygon","GeogPolygon":{"type":"Polygon","coordinates":[[[15.0,5.0],[40.0,10.0],[10.0,20.0],[5.0,10.0],[15.0,5.0]]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogCollection@odata.type":"Edm.GeographyCollection","GeogCollection":{"type":"GeometryCollection","geometries":[{"type":"Geometry
 Collection","geometries":[]},{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[1.0,2.0]}]}],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiPoint@odata.type":"Edm.GeographyMultiPoint","GeogMultiPoint":{"type":"MultiPoint","coordinates":[[-122.7,47.38]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiLine@odata.type":"Edm.GeographyMultiLineString","GeogMultiLine":{"type":"MultiLineString","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiPolygon@odata.type":"Edm.GeographyMultiPolygon","GeogMultiPolygon":{"type":"MultiPolygon","coordinates":[[[[40.0,40.0],[20.0,45.0],[45.0,30.0],[40.0,40.0]]],[[[20.0,35.0],[45.0,20.0],[30.0,5.0],[10.0,10.0],[10.0,30.0],[20.0,35.0]],[[30.0,20.0],[20.0,25.0],[20.0,15.0],[30.0,20.0]]]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"Geom@odata.type":"Edm.Geometry","Geom":{"type":"Polygon","coordinates":[],"crs":{"type":"name","properties":{"name":"EP
 SG:0"}}},"GeomPoint@odata.type":"Edm.GeometryPoint","GeomPoint":{"type":"Point","coordinates":[4513675.2944411123,6032903.5882574534],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomLine@odata.type":"Edm.GeometryLineString","GeomLine":{"type":"LineString","coordinates":[[1.0,1.0],[3.0,3.0],[2.0,4.0],[2.0,0.0]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomPolygon@odata.type":"Edm.GeometryPolygon","GeomPolygon":{"type":"Polygon","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomCollection@odata.type":"Edm.GeometryCollection","GeomCollection":{"type":"GeometryCollection","geometries":[{"type":"GeometryCollection","geometries":[]},{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[1.0,2.0]}]}],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomMultiPoint@odata.type":"Edm.GeometryMultiPoint","GeomMultiPoint":{"type":"MultiPoint","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomMul
 tiLine@odata.type":"Edm.GeometryMultiLineString","GeomMultiLine":{"type":"MultiLineString","coordinates":[[[10.0,10.0],[20.0,20.0],[10.0,40.0]],[[40.0,40.0],[30.0,30.0],[40.0,20.0],[30.0,10.0]]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomMultiPolygon":null}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml
new file mode 100644
index 0000000..3bc5f87
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-5.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<entry xml:base="http://192.168.0.160:8080/DefaultService.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><id>http://192.168.0.160:8080/DefaultService.svc/AllGeoTypesSet(-5)</id><category term="Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialTypes" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="AllSpatialTypes" href="AllGeoTypesSet(-5)" /><title /><updated>2013-09-11T07:48:06Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">-5</d:Id><d:Geog m:type="Edm.GeographyCollection"><gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326" /></d:Geog><d:GeogPoint m:null="true" /><d:GeogLine m:type="Edm.GeographyLineString"><gml:LineString gml:srsN
 ame="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pos>10.5 10.5</gml:pos><gml:pos>20.5 20.5</gml:pos><gml:pos>40.5 10.5</gml:pos></gml:LineString></d:GeogLine><d:GeogPolygon m:type="Edm.GeographyPolygon"><gml:Polygon gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:exterior><gml:LinearRing><gml:pos>5 15</gml:pos><gml:pos>10 40</gml:pos><gml:pos>20 10</gml:pos><gml:pos>10 5</gml:pos><gml:pos>5 15</gml:pos></gml:LinearRing></gml:exterior></gml:Polygon></d:GeogPolygon><d:GeogCollection m:type="Edm.GeographyCollection"><gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:geometryMembers><gml:MultiGeometry /><gml:MultiGeometry><gml:geometryMembers><gml:Point><gml:pos>2 1</gml:pos></gml:Point></gml:geometryMembers></gml:MultiGeometry></gml:geometryMembers></gml:MultiGeometry></d:GeogCollection><d:GeogMultiPoint m:type="Edm.GeographyMultiPoint"><gml:MultiPoint gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pointMembers><gml:Point>
 <gml:pos>47.38 -122.7</gml:pos></gml:Point></gml:pointMembers></gml:MultiPoint></d:GeogMultiPoint><d:GeogMultiLine m:type="Edm.GeographyMultiLineString"><gml:MultiCurve gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326" /></d:GeogMultiLine><d:GeogMultiPolygon m:type="Edm.GeographyMultiPolygon"><gml:MultiSurface gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:surfaceMembers><gml:Polygon><gml:exterior><gml:LinearRing><gml:pos>40 40</gml:pos><gml:pos>45 20</gml:pos><gml:pos>30 45</gml:pos><gml:pos>40 40</gml:pos></gml:LinearRing></gml:exterior></gml:Polygon><gml:Polygon><gml:exterior><gml:LinearRing><gml:pos>35 20</gml:pos><gml:pos>20 45</gml:pos><gml:pos>5 30</gml:pos><gml:pos>10 10</gml:pos><gml:pos>30 10</gml:pos><gml:pos>35 20</gml:pos></gml:LinearRing></gml:exterior><gml:interior><gml:LinearRing><gml:pos>20 30</gml:pos><gml:pos>25 20</gml:pos><gml:pos>15 20</gml:pos><gml:pos>20 30</gml:pos></gml:LinearRing></gml:interior></gml:Polygon></gml:surfaceMembers></gml
 :MultiSurface></d:GeogMultiPolygon><d:Geom m:type="Edm.GeometryPolygon"><gml:Polygon gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0" /></d:Geom><d:GeomPoint m:type="Edm.GeometryPoint"><gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>4513675.2944411123 6032903.5882574534</gml:pos></gml:Point></d:GeomPoint><d:GeomLine m:type="Edm.GeometryLineString"><gml:LineString gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>1 1</gml:pos><gml:pos>3 3</gml:pos><gml:pos>2 4</gml:pos><gml:pos>2 0</gml:pos></gml:LineString></d:GeomLine><d:GeomPolygon m:type="Edm.GeometryPolygon"><gml:Polygon gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0" /></d:GeomPolygon><d:GeomCollection m:type="Edm.GeometryCollection"><gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:geometryMembers><gml:MultiGeometry /><gml:MultiGeometry><gml:geometryMembers><gml:Point><gml:pos>1 2</gml:pos></gml:Point></gml:geometryMembers></gml:MultiGeometry></gml:g
 eometryMembers></gml:MultiGeometry></d:GeomCollection><d:GeomMultiPoint m:type="Edm.GeometryMultiPoint"><gml:MultiPoint gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0" /></d:GeomMultiPoint><d:GeomMultiLine m:type="Edm.GeometryMultiLineString"><gml:MultiCurve gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:curveMembers><gml:LineString><gml:pos>10 10</gml:pos><gml:pos>20 20</gml:pos><gml:pos>10 40</gml:pos></gml:LineString><gml:LineString><gml:pos>40 40</gml:pos><gml:pos>30 30</gml:pos><gml:pos>40 20</gml:pos><gml:pos>30 10</gml:pos></gml:LineString></gml:curveMembers></gml:MultiCurve></d:GeomMultiLine><d:GeomMultiPolygon m:null="true" /></m:properties></content></entry>

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.json
new file mode 100644
index 0000000..2e3469b
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.43.55:8080/DefaultService.svc/$metadata#AllGeoTypesSet/@Element","odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialTypes","odata.id":"http://192.168.43.55:8080/DefaultService.svc/AllGeoTypesSet(-8)","odata.editLink":"AllGeoTypesSet(-8)","Id":-8,"Geog@odata.type":"Edm.Geography","Geog":{"type":"Point","coordinates":[178.94,51.5961],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogPoint@odata.type":"Edm.GeographyPoint","GeogPoint":{"type":"Point","coordinates":[178.7,51.65],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogLine@odata.type":"Edm.GeographyLineString","GeogLine":{"type":"LineString","coordinates":[[10.0,10.0],[20.0,20.0],[10.0,40.0]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogPolygon@odata.type":"Edm.GeographyPolygon","GeogPolygon":{"type":"Polygon","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogCollection@odata.type":"Edm.GeographyColle
 ction","GeogCollection":{"type":"GeometryCollection","geometries":[],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiPoint@odata.type":"Edm.GeographyMultiPoint","GeogMultiPoint":{"type":"MultiPoint","coordinates":[[-122.7,47.38]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiLine@odata.type":"Edm.GeographyMultiLineString","GeogMultiLine":{"type":"MultiLineString","coordinates":[[[10.5,10.5],[20.5,20.5],[10.5,40.5]],[[40.5,40.5],[30.5,30.5],[40.5,20.5],[30.5,10.5]]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"GeogMultiPolygon@odata.type":"Edm.GeographyMultiPolygon","GeogMultiPolygon":{"type":"MultiPolygon","coordinates":[[[[40.0,40.0],[20.0,45.0],[45.0,30.0],[40.0,40.0]]],[[[20.0,35.0],[45.0,20.0],[30.0,5.0],[10.0,10.0],[10.0,30.0],[20.0,35.0]],[[30.0,20.0],[20.0,25.0],[20.0,15.0],[30.0,20.0]]]],"crs":{"type":"name","properties":{"name":"EPSG:4326"}}},"Geom@odata.type":"Edm.Geometry","Geom":{"type":"Point","coordinates":[4369367.0
 586663447,6352015.6916818349],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomPoint@odata.type":"Edm.GeometryPoint","GeomPoint":{"type":"Point","coordinates":[4377000.868172125,6348217.1067010015],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomLine@odata.type":"Edm.GeometryLineString","GeomLine":{"type":"LineString","coordinates":[[1.0,1.0],[3.0,3.0],[2.0,4.0],[2.0,0.0]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomPolygon@odata.type":"Edm.GeometryPolygon","GeomPolygon":{"type":"Polygon","coordinates":[[[30.0,20.0],[10.0,40.0],[45.0,40.0],[30.0,20.0]]],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomCollection@odata.type":"Edm.GeometryCollection","GeomCollection":{"type":"GeometryCollection","geometries":[{"type":"Point","coordinates":[4.0,6.0]},{"type":"LineString","coordinates":[[4.0,6.0],[7.0,10.0]]}],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomMultiPoint":null,"GeomMultiLine@odata.type":"Edm.GeometryMultiLineString",
 "GeomMultiLine":{"type":"MultiLineString","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:0"}}},"GeomMultiPolygon@odata.type":"Edm.GeometryMultiPolygon","GeomMultiPolygon":{"type":"MultiPolygon","coordinates":[],"crs":{"type":"name","properties":{"name":"EPSG:0"}}}}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml
new file mode 100644
index 0000000..13e2aea
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/AllGeoTypesSet_-8.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<entry xml:base="http://192.168.43.55:8080/DefaultService.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><id>http://192.168.43.55:8080/DefaultService.svc/AllGeoTypesSet(-8)</id><category term="Microsoft.Test.OData.Services.AstoriaDefaultService.AllSpatialTypes" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="AllSpatialTypes" href="AllGeoTypesSet(-8)" /><title /><updated>2013-08-21T10:50:04Z</updated><author><name /></author><content type="application/xml"><m:properties><d:Id m:type="Edm.Int32">-8</d:Id><d:Geog m:type="Edm.GeographyPoint"><gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pos>51.5961 178.94</gml:pos></gml:Point></d:Geog><d:GeogPoint m:type="Edm.GeographyPoint"><gml:Point gml:srsName="htt
 p://www.opengis.net/def/crs/EPSG/0/4326"><gml:pos>51.65 178.7</gml:pos></gml:Point></d:GeogPoint><d:GeogLine m:type="Edm.GeographyLineString"><gml:LineString gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pos>10 10</gml:pos><gml:pos>20 20</gml:pos><gml:pos>40 10</gml:pos></gml:LineString></d:GeogLine><d:GeogPolygon m:type="Edm.GeographyPolygon"><gml:Polygon gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326" /></d:GeogPolygon><d:GeogCollection m:type="Edm.GeographyCollection"><gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326" /></d:GeogCollection><d:GeogMultiPoint m:type="Edm.GeographyMultiPoint"><gml:MultiPoint gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:pointMembers><gml:Point><gml:pos>47.38 -122.7</gml:pos></gml:Point></gml:pointMembers></gml:MultiPoint></d:GeogMultiPoint><d:GeogMultiLine m:type="Edm.GeographyMultiLineString"><gml:MultiCurve gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:curveMembers><g
 ml:LineString><gml:pos>10.5 10.5</gml:pos><gml:pos>20.5 20.5</gml:pos><gml:pos>40.5 10.5</gml:pos></gml:LineString><gml:LineString><gml:pos>40.5 40.5</gml:pos><gml:pos>30.5 30.5</gml:pos><gml:pos>20.5 40.5</gml:pos><gml:pos>10.5 30.5</gml:pos></gml:LineString></gml:curveMembers></gml:MultiCurve></d:GeogMultiLine><d:GeogMultiPolygon m:type="Edm.GeographyMultiPolygon"><gml:MultiSurface gml:srsName="http://www.opengis.net/def/crs/EPSG/0/4326"><gml:surfaceMembers><gml:Polygon><gml:exterior><gml:LinearRing><gml:pos>40 40</gml:pos><gml:pos>45 20</gml:pos><gml:pos>30 45</gml:pos><gml:pos>40 40</gml:pos></gml:LinearRing></gml:exterior></gml:Polygon><gml:Polygon><gml:exterior><gml:LinearRing><gml:pos>35 20</gml:pos><gml:pos>20 45</gml:pos><gml:pos>5 30</gml:pos><gml:pos>10 10</gml:pos><gml:pos>30 10</gml:pos><gml:pos>35 20</gml:pos></gml:LinearRing></gml:exterior><gml:interior><gml:LinearRing><gml:pos>20 30</gml:pos><gml:pos>25 20</gml:pos><gml:pos>15 20</gml:pos><gml:pos>20 30</gml:pos></gm
 l:LinearRing></gml:interior></gml:Polygon></gml:surfaceMembers></gml:MultiSurface></d:GeogMultiPolygon><d:Geom m:type="Edm.GeometryPoint"><gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>4369367.0586663447 6352015.6916818349</gml:pos></gml:Point></d:Geom><d:GeomPoint m:type="Edm.GeometryPoint"><gml:Point gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>4377000.868172125 6348217.1067010015</gml:pos></gml:Point></d:GeomPoint><d:GeomLine m:type="Edm.GeometryLineString"><gml:LineString gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:pos>1 1</gml:pos><gml:pos>3 3</gml:pos><gml:pos>2 4</gml:pos><gml:pos>2 0</gml:pos></gml:LineString></d:GeomLine><d:GeomPolygon m:type="Edm.GeometryPolygon"><gml:Polygon gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:exterior><gml:LinearRing><gml:pos>30 20</gml:pos><gml:pos>10 40</gml:pos><gml:pos>45 40</gml:pos><gml:pos>30 20</gml:pos></gml:LinearRing></gml:exterior></gml:Polygon></d:GeomPolygon>
 <d:GeomCollection m:type="Edm.GeometryCollection"><gml:MultiGeometry gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0"><gml:geometryMembers><gml:Point><gml:pos>4 6</gml:pos></gml:Point><gml:LineString><gml:pos>4 6</gml:pos><gml:pos>7 10</gml:pos></gml:LineString></gml:geometryMembers></gml:MultiGeometry></d:GeomCollection><d:GeomMultiPoint m:null="true" /><d:GeomMultiLine m:type="Edm.GeometryMultiLineString"><gml:MultiCurve gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0" /></d:GeomMultiLine><d:GeomMultiPolygon m:type="Edm.GeometryMultiPolygon"><gml:MultiSurface gml:srsName="http://www.opengis.net/def/crs/EPSG/0/0" /></d:GeomMultiPolygon></m:properties></content></entry>

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.json
new file mode 100644
index 0000000..d62d51b
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.43.55:8080/DefaultService.svc/$metadata#Car/@Element","odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Car","odata.id":"http://192.168.43.55:8080/DefaultService.svc/Car(16)","odata.editLink":"Car(16)","odata.mediaEditLink":"Car(16)/$value","odata.mediaReadLink":"Car(16)/$value","odata.mediaContentType":"*/*","Photo@odata.mediaEditLink":"Car(16)/Photo","Photo@odata.mediaContentType":"application/octet-stream","Video@odata.mediaEditLink":"Car(16)/Video","VIN":16,"Description":"\u3041\u30bc\u3092\u3042\u30af\u3073\u30bc\u30bc\u30a1\u30a1\u305b\u30de\u307b\u30b0\u30bd\u30d0\u305b\u0451\u88f9\uff66\u307d\uff9d\u30a1"}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.xml
new file mode 100644
index 0000000..e9ab95e
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/Car_16.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<entry xml:base="http://192.168.43.55:8080/DefaultService.svc/" 
+       xmlns="http://www.w3.org/2005/Atom" 
+       xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" 
+       xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" 
+       xmlns:georss="http://www.georss.org/georss" 
+       xmlns:gml="http://www.opengis.net/gml">
+  
+  <id>http://192.168.43.55:8080/DefaultService.svc/Car(16)</id>
+  <category term="Microsoft.Test.OData.Services.AstoriaDefaultService.Car" 
+            scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
+  <link rel="edit" title="Car" href="Car(16)" />
+  <title />
+  <updated>2013-08-21T10:31:09Z</updated>
+  <author>
+    <name />
+  </author>
+  <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/edit-media/Photo" 
+        type="application/octet-stream" title="Photo" href="Car(16)/Photo" />
+  <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/edit-media/Video" 
+        title="Video" href="Car(16)/Video" />
+  <link rel="edit-media" title="Car" href="Car(16)/$value" />
+  <content type="*/*" src="Car(16)/$value" />
+  <m:properties>
+    <d:VIN m:type="Edm.Int32">16</d:VIN>
+    <d:Description>ぁゼをあクびゼゼァァせマほグソバせё裹ヲぽンァ</d:Description>
+  </m:properties>
+</entry>

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.json
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.json b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.json
new file mode 100644
index 0000000..88c7804
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.json
@@ -0,0 +1 @@
+{"odata.metadata":"http://192.168.43.55:8080/DefaultService.svc/$metadata#ComputerDetail/@Element","odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.ComputerDetail","odata.id":"http://192.168.43.55:8080/DefaultService.svc/ComputerDetail(-10)","odata.editLink":"ComputerDetail(-10)","Computer@odata.navigationLinkUrl":"ComputerDetail(-10)/Computer","#DefaultContainer.ResetComputerDetailsSpecifications":{"title":"ResetComputerDetailsSpecifications","target":"http://192.168.43.55:8080/DefaultService.svc/ComputerDetail(-10)/ResetComputerDetailsSpecifications"},"ComputerDetailId":-10,"Manufacturer":"sspayuqgmkizmvtxdeuitrnqcblxoipcsshhfvibxuzssatvjjhoftpk","Model":"usfvbkyxssojjebyzgvtnzkuik\u00dfuxrmllzyglnsssluyxf\u00dfssioyroouxafzbhbsabkrsslbyhghicjaplolzqss\u00dfhhfix","Serial":null,"SpecificationsBag@odata.type":"Collection(Edm.String)","SpecificationsBag":["vorjqalydmfuazkatkiydeicefrjhyuaupkfgbxiaehjrqhhqv","rbsejgfgelhsdahkoqlnzvbq","ssfvnnquahsczxlu\u00dfnssrhpssz
 luundy\u00dfehyzjedssxom","xsqocvqrzbvzhdhtilugpvayirrnomupxinhihazfghqehqymeeaupuesseluinjgbedrarqluedjfx","eekuucympfgkucszfuggbmfglpnxnjvhkhalymhtfuggfafulkzedqlksoduqeyukzzhbbasjmee","\u30be\u3092\u4e5d\u30af\u305d"],"PurchaseDate@odata.type":"Edm.DateTime","PurchaseDate":"2020-12-15T01:33:35.8014568","Dimensions":{"odata.type":"Microsoft.Test.OData.Services.AstoriaDefaultService.Dimensions","Width@odata.type":"Edm.Decimal","Width":"-8917.92836319839","Height@odata.type":"Edm.Decimal","Height":"-79228162514264337593543950335","Depth@odata.type":"Edm.Decimal","Depth":"-79228162514264337593543950335"}}

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata4/blob/78c3eaa4/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.xml
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.xml b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.xml
new file mode 100644
index 0000000..f9c0e4f
--- /dev/null
+++ b/lib/client-core/src/test/resources/org/apache/olingo/client/core/v3/ComputerDetail_-10.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+
+-->
+<entry xml:base="http://192.168.43.55:8080/DefaultService.svc/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"><id>http://192.168.43.55:8080/DefaultService.svc/ComputerDetail(-10)</id><category term="Microsoft.Test.OData.Services.AstoriaDefaultService.ComputerDetail" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" /><link rel="edit" title="ComputerDetail" href="ComputerDetail(-10)" /><link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Computer" type="application/atom+xml;type=entry" title="Computer" href="ComputerDetail(-10)/Computer" /><title /><updated>2013-08-21T10:53:24Z</updated><author><name /><uri>usfvbkyxssojjebyzgvtnzkuikßuxrmllzyglnsssluyxfßssioyroouxafzbhbsabkrsslbyhghicjaplolzqssßhhfix</uri><email>sspayuqgmkizmvtxdeuitrn
 qcblxoipcsshhfvibxuzssatvjjhoftpk</email></author><m:action metadata="http://192.168.43.55:8080/DefaultService.svc/$metadata#DefaultContainer.ResetComputerDetailsSpecifications" title="ResetComputerDetailsSpecifications" target="http://192.168.43.55:8080/DefaultService.svc/ComputerDetail(-10)/ResetComputerDetailsSpecifications" /><content type="application/xml"><m:properties><d:ComputerDetailId m:type="Edm.Int32">-10</d:ComputerDetailId><d:Manufacturer>sspayuqgmkizmvtxdeuitrnqcblxoipcsshhfvibxuzssatvjjhoftpk</d:Manufacturer><d:Model>usfvbkyxssojjebyzgvtnzkuikßuxrmllzyglnsssluyxfßssioyroouxafzbhbsabkrsslbyhghicjaplolzqssßhhfix</d:Model><d:Serial m:null="true" /><d:SpecificationsBag m:type="Collection(Edm.String)"><d:element>vorjqalydmfuazkatkiydeicefrjhyuaupkfgbxiaehjrqhhqv</d:element><d:element>rbsejgfgelhsdahkoqlnzvbq</d:element><d:element>ssfvnnquahsczxlußnssrhpsszluundyßehyzjedssxom</d:element><d:element>xsqocvqrzbvzhdhtilugpvayirrnomupxinhihazfghqehqymeeaupuesseluinjgbedrar
 qluedjfx</d:element><d:element>eekuucympfgkucszfuggbmfglpnxnjvhkhalymhtfuggfafulkzedqlksoduqeyukzzhbbasjmee</d:element><d:element>ゾを九クそ</d:element></d:SpecificationsBag><d:PurchaseDate m:type="Edm.DateTime">2020-12-15T01:33:35.8014568</d:PurchaseDate><d:Dimensions m:type="Microsoft.Test.OData.Services.AstoriaDefaultService.Dimensions"><d:Width m:type="Edm.Decimal">-8917.92836319839</d:Width><d:Height m:type="Edm.Decimal">-79228162514264337593543950335</d:Height><d:Depth m:type="Edm.Decimal">-79228162514264337593543950335</d:Depth></d:Dimensions></m:properties></content></entry>