olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [06/22] olingo-odata4 git commit: [OLINGO-852] less warnings + general clean-up
Date Sat, 13 Feb 2016 06:34:00 GMT
http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/client-core/src/test/java/org/apache/olingo/client/core/EntityTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/EntityTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/EntityTest.java
index 9f5d405..0d075a9 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/EntityTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/EntityTest.java
@@ -50,11 +50,6 @@ import org.junit.Test;
 
 public class EntityTest extends AbstractTest {
 
-  @Override
-  protected ODataClient getClient() {
-    return v4Client;
-  }
-
   private EdmEnabledODataClient getEdmEnabledClient() {
     return new EdmEnabledODataClientImpl(null, null, null) {
 
@@ -78,8 +73,8 @@ public class EntityTest extends AbstractTest {
 
   private void singleton(final ContentType contentType) throws Exception {
     final InputStream input = getClass().getResourceAsStream("VipCustomer." + getSuffix(contentType));
-    final ClientEntity entity = getClient().getBinder().getODataEntity(
-        getClient().getDeserializer(contentType).toEntity(input));
+    final ClientEntity entity = client.getBinder().getODataEntity(
+        client.getDeserializer(contentType).toEntity(input));
     assertNotNull(entity);
 
     assertEquals("Microsoft.Test.OData.Services.ODataWCFService.Customer", entity.getTypeName().toString());
@@ -120,8 +115,8 @@ public class EntityTest extends AbstractTest {
 
     // operations won't get serialized
     entity.getOperations().clear();
-    final ClientEntity written = getClient().getBinder().getODataEntity(
-        new ResWrap<Entity>((URI) null, null, getClient().getBinder().getEntity(entity)));
+    final ClientEntity written = client.getBinder().getODataEntity(
+        new ResWrap<Entity>((URI) null, null, client.getBinder().getEntity(entity)));
     assertEquals(entity, written);
     input.close();
   }
@@ -138,8 +133,8 @@ public class EntityTest extends AbstractTest {
 
   private void withEnums(final ContentType contentType) throws Exception {
     final InputStream input = getClass().getResourceAsStream("Products_5." + getSuffix(contentType));
-    final ClientEntity entity = getClient().getBinder().getODataEntity(
-        getClient().getDeserializer(contentType).toEntity(input));
+    final ClientEntity entity = client.getBinder().getODataEntity(
+        client.getDeserializer(contentType).toEntity(input));
     assertNotNull(entity);
 
     final ClientProperty skinColor = entity.getProperty("SkinColor");
@@ -156,8 +151,8 @@ public class EntityTest extends AbstractTest {
 
     // operations won't get serialized
     entity.getOperations().clear();
-    final ClientEntity written = getClient().getBinder().getODataEntity(
-        new ResWrap<Entity>((URI) null, null, getClient().getBinder().getEntity(entity)));
+    final ClientEntity written = client.getBinder().getODataEntity(
+        new ResWrap<Entity>((URI) null, null, client.getBinder().getEntity(entity)));
     assertEquals(entity, written);
     input.close();
   }
@@ -175,8 +170,8 @@ public class EntityTest extends AbstractTest {
   private void withInlineEntitySet(final ContentType contentType) throws Exception {
     final InputStream input = getClass().getResourceAsStream(
         "Accounts_101_expand_MyPaymentInstruments." + getSuffix(contentType));
-    final ClientEntity entity = getClient().getBinder().getODataEntity(
-        getClient().getDeserializer(contentType).toEntity(input));
+    final ClientEntity entity = client.getBinder().getODataEntity(
+        client.getDeserializer(contentType).toEntity(input));
     assertNotNull(entity);
 
     final ClientLink instruments = entity.getNavigationLink("MyPaymentInstruments");
@@ -191,8 +186,8 @@ public class EntityTest extends AbstractTest {
     inline.getEntitySet().setCount(3);
     // operations won't get serialized
     entity.getOperations().clear();
-    final ClientEntity written = getClient().getBinder().getODataEntity(
-        new ResWrap<Entity>((URI) null, null, getClient().getBinder().getEntity(entity)));
+    final ClientEntity written = client.getBinder().getODataEntity(
+        new ResWrap<Entity>((URI) null, null, client.getBinder().getEntity(entity)));
     assertEquals(entity, written);
     input.close();
   }
@@ -210,16 +205,16 @@ public class EntityTest extends AbstractTest {
   private void mediaEntity(final ContentType contentType) throws Exception {
     final InputStream input = getClass().getResourceAsStream(
         "Advertisements_f89dee73-af9f-4cd4-b330-db93c25ff3c7." + getSuffix(contentType));
-    final ClientEntity entity = getClient().getBinder().getODataEntity(
-        getClient().getDeserializer(contentType).toEntity(input));
+    final ClientEntity entity = client.getBinder().getODataEntity(
+        client.getDeserializer(contentType).toEntity(input));
     assertNotNull(entity);
 
     assertTrue(entity.isMediaEntity());
     assertNotNull(entity.getMediaContentSource());
     assertEquals("\"8zOOKKvgOtptr4gt8IrnapX3jds=\"", entity.getMediaETag());
 
-    final ClientEntity written = getClient().getBinder().getODataEntity(
-        new ResWrap<Entity>((URI) null, null, getClient().getBinder().getEntity(entity)));
+    final ClientEntity written = client.getBinder().getODataEntity(
+        new ResWrap<Entity>((URI) null, null, client.getBinder().getEntity(entity)));
     assertEquals(entity, written);
     input.close();
   }
@@ -236,8 +231,8 @@ public class EntityTest extends AbstractTest {
 
   private void withStream(final ContentType contentType) throws Exception {
     final InputStream input = getClass().getResourceAsStream("PersonDetails_1." + getSuffix(contentType));
-    final ClientEntity entity = getClient().getBinder().getODataEntity(
-        getClient().getDeserializer(contentType).toEntity(input));
+    final ClientEntity entity = client.getBinder().getODataEntity(
+        client.getDeserializer(contentType).toEntity(input));
     assertNotNull(entity);
 
     assertFalse(entity.isMediaEntity());
@@ -245,8 +240,8 @@ public class EntityTest extends AbstractTest {
     final ClientLink editMedia = entity.getMediaEditLink("Photo");
     assertNotNull(editMedia);
 
-    final ClientEntity written = getClient().getBinder().getODataEntity(
-        new ResWrap<Entity>((URI) null, null, getClient().getBinder().getEntity(entity)));
+    final ClientEntity written = client.getBinder().getODataEntity(
+        new ResWrap<Entity>((URI) null, null, client.getBinder().getEntity(entity)));
     assertEquals(entity, written);
     input.close();
   }
@@ -263,14 +258,14 @@ public class EntityTest extends AbstractTest {
 
   private void ref(final ContentType contentType) throws Exception {
     final InputStream input = getClass().getResourceAsStream("entityReference." + getSuffix(contentType));
-    final ClientEntity entity = getClient().getBinder().getODataEntity(
-        getClient().getDeserializer(contentType).toEntity(input));
+    final ClientEntity entity = client.getBinder().getODataEntity(
+        client.getDeserializer(contentType).toEntity(input));
     assertNotNull(entity);
 
     assertNotNull(entity.getId());
 
-    final ClientEntity written = getClient().getBinder().getODataEntity(
-        new ResWrap<Entity>((URI) null, null, getClient().getBinder().getEntity(entity)));
+    final ClientEntity written = client.getBinder().getODataEntity(
+        new ResWrap<Entity>((URI) null, null, client.getBinder().getEntity(entity)));
     assertEquals(entity, written);
     input.close();
   }
@@ -287,8 +282,8 @@ public class EntityTest extends AbstractTest {
 
   private void complexNavigationProperties(final ContentType contentType) throws Exception {
     final InputStream input = getClass().getResourceAsStream("entity.withcomplexnavigation." + getSuffix(contentType));
-    final ClientEntity entity = getClient().getBinder().getODataEntity(
-        getClient().getDeserializer(contentType).toEntity(input));
+    final ClientEntity entity = client.getBinder().getODataEntity(
+        client.getDeserializer(contentType).toEntity(input));
     assertNotNull(entity);
 
     final ClientComplexValue addressValue = entity.getProperty("Address").getComplexValue();
@@ -297,8 +292,8 @@ public class EntityTest extends AbstractTest {
 
     // ETag is not serialized
     entity.setETag(null);
-    final ClientEntity written = getClient().getBinder().getODataEntity(
-        new ResWrap<Entity>((URI) null, null, getClient().getBinder().getEntity(entity)));
+    final ClientEntity written = client.getBinder().getODataEntity(
+        new ResWrap<Entity>((URI) null, null, client.getBinder().getEntity(entity)));
     assertEquals(entity, written);
     input.close();
   }
@@ -315,8 +310,8 @@ public class EntityTest extends AbstractTest {
 
   private void annotated(final ContentType contentType) throws EdmPrimitiveTypeException, Exception {
     final InputStream input = getClass().getResourceAsStream("annotated." + getSuffix(contentType));
-    final ClientEntity entity = getClient().getBinder().getODataEntity(
-        getClient().getDeserializer(contentType).toEntity(input));
+    final ClientEntity entity = client.getBinder().getODataEntity(
+        client.getDeserializer(contentType).toEntity(input));
     assertNotNull(entity);
 
     assertFalse(entity.getAnnotations().isEmpty());
@@ -343,8 +338,8 @@ public class EntityTest extends AbstractTest {
     assertEquals(2,
         annotation.getValue().asComplex().get("order").getPrimitiveValue().toCastValue(Integer.class), 0);
 
-    final ClientEntity written = getClient().getBinder().getODataEntity(
-        new ResWrap<Entity>((URI) null, null, getClient().getBinder().getEntity(entity)));
+    final ClientEntity written = client.getBinder().getODataEntity(
+        new ResWrap<Entity>((URI) null, null, client.getBinder().getEntity(entity)));
     assertEquals(entity, written);
     input.close();
   }
@@ -374,7 +369,7 @@ public class EntityTest extends AbstractTest {
 
   @Test
   public void derivedFromAtom() throws Exception {
-    derived(getClient(), ContentType.APPLICATION_ATOM_XML);
+    derived(client, ContentType.APPLICATION_ATOM_XML);
   }
 
   @Test
@@ -384,6 +379,6 @@ public class EntityTest extends AbstractTest {
 
   @Test
   public void derivedFromFullJSON() throws Exception {
-    derived(getClient(), ContentType.JSON_FULL_METADATA);
+    derived(client, ContentType.JSON_FULL_METADATA);
   }
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/client-core/src/test/java/org/apache/olingo/client/core/ErrorTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/ErrorTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/ErrorTest.java
index 8ced6a3..60bbcd0 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/ErrorTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/ErrorTest.java
@@ -21,7 +21,6 @@ package org.apache.olingo.client.core;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 
-import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.serialization.ODataDeserializerException;
 import org.apache.olingo.commons.api.ex.ODataError;
 import org.apache.olingo.commons.api.format.ContentType;
@@ -29,13 +28,8 @@ import org.junit.Test;
 
 public class ErrorTest extends AbstractTest {
 
-  @Override
-  protected ODataClient getClient() {
-    return v4Client;
-  }
-
   private ODataError error(final String name, final ContentType contentType) throws ODataDeserializerException {
-    final ODataError error = getClient().getDeserializer(contentType).toError(
+    final ODataError error = client.getDeserializer(contentType).toError(
             getClass().getResourceAsStream(name + "." + getSuffix(contentType)));
     assertNotNull(error);
     return error;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/client-core/src/test/java/org/apache/olingo/client/core/JSONTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/JSONTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/JSONTest.java
index 9273229..a276c4f 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/JSONTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/JSONTest.java
@@ -30,7 +30,6 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.commons.io.IOUtils;
-import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.domain.ClientCollectionValue;
 import org.apache.olingo.client.api.domain.ClientComplexValue;
 import org.apache.olingo.client.api.domain.ClientEntity;
@@ -50,11 +49,6 @@ public class JSONTest extends AbstractTest {
 
   private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
 
-  @Override
-  protected ODataClient getClient() {
-    return v4Client;
-  }
-
   protected ContentType getODataPubFormat() {
     return ContentType.JSON;
   }
@@ -129,7 +123,7 @@ public class JSONTest extends AbstractTest {
 
   protected void entitySet(final String filename, final ContentType contentType) throws Exception {
     final StringWriter writer = new StringWriter();
-    getClient().getSerializer(contentType).write(writer, getClient().getDeserializer(contentType).toEntitySet(
+    client.getSerializer(contentType).write(writer, client.getDeserializer(contentType).toEntitySet(
         getClass().getResourceAsStream(filename + "." + getSuffix(contentType))).getPayload());
 
     assertSimilar(filename + "." + getSuffix(contentType), writer.toString());
@@ -143,7 +137,7 @@ public class JSONTest extends AbstractTest {
 
   protected void entity(final String filename, final ContentType contentType) throws Exception {
     final StringWriter writer = new StringWriter();
-    getClient().getSerializer(contentType).write(writer, getClient().getDeserializer(contentType).toEntity(
+    client.getSerializer(contentType).write(writer, client.getDeserializer(contentType).toEntity(
         getClass().getResourceAsStream(filename + "." + getSuffix(contentType))).getPayload());
     assertSimilar(filename + "." + getSuffix(contentType), writer.toString());
   }
@@ -169,7 +163,7 @@ public class JSONTest extends AbstractTest {
 
   protected void property(final String filename, final ContentType contentType) throws Exception {
     final StringWriter writer = new StringWriter();
-    getClient().getSerializer(contentType).write(writer, getClient().getDeserializer(contentType).
+    client.getSerializer(contentType).write(writer, client.getDeserializer(contentType).
         toProperty(getClass().getResourceAsStream(filename + "." + getSuffix(contentType))).getPayload());
 
     assertSimilar(filename + "." + getSuffix(contentType), writer.toString());
@@ -185,12 +179,12 @@ public class JSONTest extends AbstractTest {
 
   @Test
   public void crossjoin() throws Exception {
-    assertNotNull(getClient().getDeserializer(ContentType.JSON_FULL_METADATA).toEntitySet(
+    assertNotNull(client.getDeserializer(ContentType.JSON_FULL_METADATA).toEntitySet(
         getClass().getResourceAsStream("crossjoin.json")));
   }
 
   protected void delta(final String filename, final ContentType contentType) throws Exception {
-    final Delta delta = getClient().getDeserializer(contentType).toDelta(
+    final Delta delta = client.getDeserializer(contentType).toDelta(
         getClass().getResourceAsStream(filename + "." + getSuffix(contentType))).getPayload();
     assertNotNull(delta);
     assertNotNull(delta.getDeltaLink());
@@ -223,30 +217,30 @@ public class JSONTest extends AbstractTest {
 
   @Test
   public void issueOLINGO390() throws Exception {
-    final ClientEntity message = getClient().getObjectFactory().
+    final ClientEntity message = client.getObjectFactory().
         newEntity(new FullQualifiedName("Microsoft.Exchange.Services.OData.Model.Message"));
 
-    final ClientComplexValue toRecipient = getClient().getObjectFactory().
+    final ClientComplexValue toRecipient = client.getObjectFactory().
         newComplexValue("Microsoft.Exchange.Services.OData.Model.Recipient");
-    toRecipient.add(getClient().getObjectFactory().newPrimitiveProperty("Name",
-        getClient().getObjectFactory().newPrimitiveValueBuilder().buildString("challen_olingo_client")));
-    toRecipient.add(getClient().getObjectFactory().newPrimitiveProperty("Address",
-        getClient().getObjectFactory().newPrimitiveValueBuilder().buildString("challenh@microsoft.com")));
-    final ClientCollectionValue<ClientValue> toRecipients = getClient().getObjectFactory().
+    toRecipient.add(client.getObjectFactory().newPrimitiveProperty("Name",
+        client.getObjectFactory().newPrimitiveValueBuilder().buildString("challen_olingo_client")));
+    toRecipient.add(client.getObjectFactory().newPrimitiveProperty("Address",
+        client.getObjectFactory().newPrimitiveValueBuilder().buildString("challenh@microsoft.com")));
+    final ClientCollectionValue<ClientValue> toRecipients = client.getObjectFactory().
         newCollectionValue("Microsoft.Exchange.Services.OData.Model.Recipient");
     toRecipients.add(toRecipient);
-    message.getProperties().add(getClient().getObjectFactory().newCollectionProperty("ToRecipients", toRecipients));
+    message.getProperties().add(client.getObjectFactory().newCollectionProperty("ToRecipients", toRecipients));
 
     final ClientComplexValue body =
-        getClient().getObjectFactory().newComplexValue("Microsoft.Exchange.Services.OData.Model.ItemBody");
-    body.add(getClient().getObjectFactory().newPrimitiveProperty("Content",
-        getClient().getObjectFactory().newPrimitiveValueBuilder().
+        client.getObjectFactory().newComplexValue("Microsoft.Exchange.Services.OData.Model.ItemBody");
+    body.add(client.getObjectFactory().newPrimitiveProperty("Content",
+        client.getObjectFactory().newPrimitiveValueBuilder().
             buildString("this is a simple email body content")));
-    body.add(getClient().getObjectFactory().newEnumProperty("ContentType",
-        getClient().getObjectFactory().newEnumValue("Microsoft.Exchange.Services.OData.Model.BodyType", "text")));
-    message.getProperties().add(getClient().getObjectFactory().newComplexProperty("Body", body));
+    body.add(client.getObjectFactory().newEnumProperty("ContentType",
+        client.getObjectFactory().newEnumValue("Microsoft.Exchange.Services.OData.Model.BodyType", "text")));
+    message.getProperties().add(client.getObjectFactory().newComplexProperty("Body", body));
 
-    final String actual = IOUtils.toString(getClient().getWriter().writeEntity(message, ContentType.JSON));
+    final String actual = IOUtils.toString(client.getWriter().writeEntity(message, ContentType.JSON));
     final JsonNode expected =
         OBJECT_MAPPER.readTree(IOUtils.toString(getClass().getResourceAsStream("olingo390.json")).
             replace(Constants.JSON_NAVIGATION_LINK, Constants.JSON_BIND_LINK_SUFFIX));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/client-core/src/test/java/org/apache/olingo/client/core/MetadataTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/MetadataTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/MetadataTest.java
index a24ca36..c150e64 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/MetadataTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/MetadataTest.java
@@ -26,7 +26,6 @@ import static org.junit.Assert.assertTrue;
 import java.io.InputStream;
 import java.util.List;
 
-import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.edm.xml.XMLMetadata;
 import org.apache.olingo.commons.api.Constants;
 import org.apache.olingo.commons.api.edm.Edm;
@@ -72,14 +71,9 @@ import org.junit.Test;
 
 public class MetadataTest extends AbstractTest {
 
-  @Override
-  protected ODataClient getClient() {
-    return v4Client;
-  }
-
   @Test
   public void parse() {
-    final Edm edm = getClient().getReader().readMetadata(getClass().getResourceAsStream("metadata.xml"));
+    final Edm edm = client.getReader().readMetadata(getClass().getResourceAsStream("metadata.xml"));
     assertNotNull(edm);
 
     // 1. Enum
@@ -140,7 +134,7 @@ public class MetadataTest extends AbstractTest {
 
   @Test
   public void demo() {
-    final XMLMetadata metadata = getClient().getDeserializer(ContentType.APPLICATION_XML).
+    final XMLMetadata metadata = client.getDeserializer(ContentType.APPLICATION_XML).
         toMetadata(getClass().getResourceAsStream("demo-metadata.xml"));
     assertNotNull(metadata);
 
@@ -154,7 +148,7 @@ public class MetadataTest extends AbstractTest {
         annots.getAnnotation("Org.OData.Publication.V1.PrivacyPolicyUrl").getExpression().asConstant().getValue());
 
     // Now let's test some edm:Annotations
-    final Edm edm = getClient().getReader().
+    final Edm edm = client.getReader().
         readMetadata(getClass().getResourceAsStream("demo-metadata.xml"));
     assertNotNull(edm);
 
@@ -181,7 +175,7 @@ public class MetadataTest extends AbstractTest {
 
   @Test
   public void multipleSchemas() {
-    final XMLMetadata metadata = getClient().getDeserializer(ContentType.APPLICATION_XML).
+    final XMLMetadata metadata = client.getDeserializer(ContentType.APPLICATION_XML).
         toMetadata(getClass().getResourceAsStream("northwind-metadata.xml"));
     assertNotNull(metadata);
 
@@ -198,10 +192,10 @@ public class MetadataTest extends AbstractTest {
 
   @Test
   public void getContainerWithoutCallingGetSchemas() {
-    final XMLMetadata metadata = getClient().getDeserializer(ContentType.APPLICATION_XML).
+    final XMLMetadata metadata = client.getDeserializer(ContentType.APPLICATION_XML).
         toMetadata(getClass().getResourceAsStream("fromdoc1-metadata.xml"));
 
-    Edm edm = getClient().getReader().readMetadata(metadata.getSchemaByNsOrAlias());
+    Edm edm = client.getReader().readMetadata(metadata.getSchemaByNsOrAlias());
 
     assertNotNull(edm.getEntityContainer());
   }
@@ -211,7 +205,7 @@ public class MetadataTest extends AbstractTest {
    */
   @Test
   public void fromdoc1() {
-    final XMLMetadata metadata = getClient().getDeserializer(ContentType.APPLICATION_XML).
+    final XMLMetadata metadata = client.getDeserializer(ContentType.APPLICATION_XML).
         toMetadata(getClass().getResourceAsStream("fromdoc1-metadata.xml"));
     assertNotNull(metadata);
 
@@ -249,7 +243,7 @@ public class MetadataTest extends AbstractTest {
         functionImport.getFunction());
 
     // Now let's go high-level
-    final Edm edm = getClient().getReader().readMetadata(getClass().getResourceAsStream("fromdoc1-metadata.xml"));
+    final Edm edm = client.getReader().readMetadata(getClass().getResourceAsStream("fromdoc1-metadata.xml"));
     assertNotNull(edm);
 
     List<EdmSchema> schemaList = edm.getSchemas();
@@ -291,7 +285,7 @@ public class MetadataTest extends AbstractTest {
    */
   @Test
   public void fromdoc2() {
-    final XMLMetadata metadata = getClient().getDeserializer(ContentType.APPLICATION_XML)
+    final XMLMetadata metadata = client.getDeserializer(ContentType.APPLICATION_XML)
         .toMetadata(getClass().getResourceAsStream("fromdoc2-metadata.xml"));
     assertNotNull(metadata);
 
@@ -336,7 +330,7 @@ public class MetadataTest extends AbstractTest {
    */
   @Test
   public void fromdoc3() {
-    final Edm edm = getClient().getReader().readMetadata(getClass().getResourceAsStream("fromdoc3-metadata.xml"));
+    final Edm edm = client.getReader().readMetadata(getClass().getResourceAsStream("fromdoc3-metadata.xml"));
     assertNotNull(edm);
 
     final EdmAnnotations group = edm.getSchema("Annotations").getAnnotationGroups().get(0);
@@ -354,7 +348,7 @@ public class MetadataTest extends AbstractTest {
    */
   @Test
   public void fromdoc4() {
-    final XMLMetadata metadata = getClient().getDeserializer(ContentType.APPLICATION_XML).
+    final XMLMetadata metadata = client.getDeserializer(ContentType.APPLICATION_XML).
         toMetadata(getClass().getResourceAsStream("fromdoc4-metadata.xml"));
     assertNotNull(metadata);
 
@@ -382,7 +376,7 @@ public class MetadataTest extends AbstractTest {
     assertTrue(urlRef.getValue().asDynamic().isApply());
 
     // Now let's go high-level
-    final Edm edm = getClient().getReader().readMetadata(getClass().getResourceAsStream("fromdoc4-metadata.xml"));
+    final Edm edm = client.getReader().readMetadata(getClass().getResourceAsStream("fromdoc4-metadata.xml"));
     assertNotNull(edm);
 
     final EdmAnnotations edmGroup = edm.getSchemas().get(0).getAnnotationGroups().get(0);
@@ -410,8 +404,7 @@ public class MetadataTest extends AbstractTest {
   @Test
   public void metadataWithCapabilities() throws Exception {
     InputStream input = getClass().getResourceAsStream("Metadata-With-Capabilities.xml");
-    final XMLMetadata metadata = getClient().getDeserializer(ContentType.APPLICATION_XML).
-        toMetadata(input);
+    final XMLMetadata metadata = client.getDeserializer(ContentType.APPLICATION_XML).toMetadata(input);
 
     CsdlSchema schema = metadata.getSchema("Capabilities");
     assertNotNull(schema);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/client-core/src/test/java/org/apache/olingo/client/core/PrimitiveValueTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/PrimitiveValueTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/PrimitiveValueTest.java
index f46f272..3c31b55 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/PrimitiveValueTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/PrimitiveValueTest.java
@@ -18,31 +18,25 @@
  */
 package org.apache.olingo.client.core;
 
-import org.apache.olingo.client.api.ODataClient;
+import static org.junit.Assert.assertEquals;
+
+import java.util.Calendar;
+
 import org.apache.olingo.client.api.domain.ClientValue;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException;
 import org.apache.olingo.commons.api.edm.EdmPrimitiveTypeKind;
 import org.junit.Test;
 
-import java.util.Calendar;
-
-import static org.junit.Assert.assertEquals;
-
 public class PrimitiveValueTest extends AbstractTest {
 
-  @Override
-  protected ODataClient getClient() {
-    return v4Client;
-  }
-
   @Test
   public void timeOfDay() throws EdmPrimitiveTypeException {
     final Calendar expected = Calendar.getInstance();
     expected.clear();
     expected.set(2013, 0, 10, 21, 45, 17);
 
-    final ClientValue value = getClient().getObjectFactory().newPrimitiveValueBuilder().
-            setType(EdmPrimitiveTypeKind.TimeOfDay).setValue(expected).build();
+    final ClientValue value = client.getObjectFactory().newPrimitiveValueBuilder()
+        .setType(EdmPrimitiveTypeKind.TimeOfDay).setValue(expected).build();
     assertEquals(EdmPrimitiveTypeKind.TimeOfDay, value.asPrimitive().getTypeKind());
 
     final Calendar actual = value.asPrimitive().toCastValue(Calendar.class);
@@ -59,8 +53,8 @@ public class PrimitiveValueTest extends AbstractTest {
     expected.clear();
     expected.set(2013, 0, 10);
 
-    final ClientValue value = getClient().getObjectFactory().newPrimitiveValueBuilder().
-            setType(EdmPrimitiveTypeKind.Date).setValue(expected).build();
+    final ClientValue value = client.getObjectFactory().newPrimitiveValueBuilder()
+        .setType(EdmPrimitiveTypeKind.Date).setValue(expected).build();
     assertEquals(EdmPrimitiveTypeKind.Date, value.asPrimitive().getTypeKind());
 
     final Calendar actual = value.asPrimitive().toCastValue(Calendar.class);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/client-core/src/test/java/org/apache/olingo/client/core/PropertyTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/PropertyTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/PropertyTest.java
index a545dc2..e7dc9ce 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/PropertyTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/PropertyTest.java
@@ -25,35 +25,29 @@ import static org.junit.Assert.assertTrue;
 import java.io.InputStream;
 import java.util.Iterator;
 
-import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.domain.ClientCollectionValue;
 import org.apache.olingo.client.api.domain.ClientComplexValue;
 import org.apache.olingo.client.api.domain.ClientProperty;
 import org.apache.olingo.client.api.domain.ClientValue;
-import org.apache.olingo.commons.api.format.ContentType;
 import org.apache.olingo.client.api.serialization.ODataDeserializerException;
 import org.apache.olingo.client.api.serialization.ODataSerializerException;
+import org.apache.olingo.commons.api.format.ContentType;
 import org.junit.Test;
 
 public class PropertyTest extends AbstractTest {
 
-  @Override
-  protected ODataClient getClient() {
-    return v4Client;
-  }
-
   private void _enum(final ContentType contentType) throws ODataDeserializerException, ODataSerializerException {
     final InputStream input = getClass().getResourceAsStream("Products_5_SkinColor." + getSuffix(contentType));
-    final ClientProperty property = getClient().getReader().readProperty(input, contentType);
+    final ClientProperty property = client.getReader().readProperty(input, contentType);
     assertNotNull(property);
     assertTrue(property.hasEnumValue());
 
-    final ClientProperty written = getClient().getReader().readProperty(
-            getClient().getWriter().writeProperty(property, contentType), contentType);
+    final ClientProperty written = client.getReader().readProperty(
+            client.getWriter().writeProperty(property, contentType), contentType);
     // This is needed because type information gets lost with serialization
     if (contentType.isCompatible(ContentType.APPLICATION_XML)) {
-      final ClientProperty comparable = getClient().getObjectFactory().newEnumProperty(property.getName(),
-              getClient().getObjectFactory().
+      final ClientProperty comparable = client.getObjectFactory().newEnumProperty(property.getName(),
+              client.getObjectFactory().
               newEnumValue(property.getEnumValue().getTypeName(), written.getEnumValue().getValue()));
 
       assertEquals(property, comparable);
@@ -72,21 +66,21 @@ public class PropertyTest extends AbstractTest {
 
   private void complex(final ContentType contentType) throws ODataDeserializerException, ODataSerializerException {
     final InputStream input = getClass().getResourceAsStream("Employees_3_HomeAddress." + getSuffix(contentType));
-    final ClientProperty property = getClient().getReader().readProperty(input, contentType);
+    final ClientProperty property = client.getReader().readProperty(input, contentType);
     assertNotNull(property);
     assertTrue(property.hasComplexValue());
     assertEquals(3, property.getComplexValue().size());
 
-    final ClientProperty written = getClient().getReader().readProperty(
-            getClient().getWriter().writeProperty(property, contentType), contentType);
+    final ClientProperty written = client.getReader().readProperty(
+            client.getWriter().writeProperty(property, contentType), contentType);
     // This is needed because type information gets lost with JSON serialization
-    final ClientComplexValue typedValue = getClient().getObjectFactory().
+    final ClientComplexValue typedValue = client.getObjectFactory().
             newComplexValue(property.getComplexValue().getTypeName());
     for (final Iterator<ClientProperty> itor = written.getComplexValue().iterator(); itor.hasNext();) {
       final ClientProperty prop = itor.next();
       typedValue.add(prop);
     }
-    final ClientProperty comparable = getClient().getObjectFactory().
+    final ClientProperty comparable = client.getObjectFactory().
             newComplexProperty(property.getName(), typedValue);
 
     assertEquals(property, comparable);
@@ -104,22 +98,22 @@ public class PropertyTest extends AbstractTest {
 
   private void collection(final ContentType contentType) throws ODataDeserializerException, ODataSerializerException {
     final InputStream input = getClass().getResourceAsStream("Products_5_CoverColors." + getSuffix(contentType));
-    final ClientProperty property = getClient().getReader().readProperty(input, contentType);
+    final ClientProperty property = client.getReader().readProperty(input, contentType);
     assertNotNull(property);
     assertTrue(property.hasCollectionValue());
     assertEquals(3, property.getCollectionValue().size());
 
-    final ClientProperty written = getClient().getReader().readProperty(
-            getClient().getWriter().writeProperty(property, contentType), contentType);
+    final ClientProperty written = client.getReader().readProperty(
+            client.getWriter().writeProperty(property, contentType), contentType);
     // This is needed because type information gets lost with JSON serialization
     if(contentType.isCompatible(ContentType.APPLICATION_XML)) {
-      final ClientCollectionValue<ClientValue> typedValue = getClient().getObjectFactory().
+      final ClientCollectionValue<ClientValue> typedValue = client.getObjectFactory().
               newCollectionValue(property.getCollectionValue().getTypeName());
       for (final Iterator<ClientValue> itor = written.getCollectionValue().iterator(); itor.hasNext();) {
         final ClientValue value = itor.next();
         typedValue.add(value);
       }
-      final ClientProperty comparable = getClient().getObjectFactory().
+      final ClientProperty comparable = client.getObjectFactory().
               newCollectionProperty(property.getName(), typedValue);
 
       assertEquals(property, comparable);

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/client-core/src/test/java/org/apache/olingo/client/core/ServiceDocumentTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/ServiceDocumentTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/ServiceDocumentTest.java
index ae06f90..7a66fac 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/ServiceDocumentTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/ServiceDocumentTest.java
@@ -24,7 +24,6 @@ import static org.junit.Assert.assertTrue;
 
 import java.net.URI;
 
-import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.data.ResWrap;
 import org.apache.olingo.client.api.data.ServiceDocument;
 import org.apache.olingo.client.api.domain.ClientServiceDocument;
@@ -34,23 +33,14 @@ import org.junit.Test;
 
 public class ServiceDocumentTest extends AbstractTest {
 
-  @Override
-  protected ODataClient getClient() {
-    return v4Client;
-  }
-
-  private String getFileExtension(final ContentType contentType) {
-    return contentType.isCompatible(ContentType.APPLICATION_XML) ? "xml" : "json";
-  }
-
   private ClientServiceDocument parse(final ContentType contentType) throws ODataDeserializerException {
-    ResWrap<ServiceDocument> service = getClient().getDeserializer(contentType).toServiceDocument(
-        getClass().getResourceAsStream("serviceDocument." + getFileExtension(contentType)));
+    ResWrap<ServiceDocument> service = client.getDeserializer(contentType).toServiceDocument(
+        getClass().getResourceAsStream("serviceDocument." + getSuffix(contentType)));
 
     assertEquals(URI.create("http://host/service/$metadata"), service.getContextURL());
     assertEquals("W/\"MjAxMy0wNS0xM1QxNDo1NFo=\"", service.getMetadataETag());
 
-    final ClientServiceDocument serviceDocument = getClient().getBinder().getODataServiceDocument(service.getPayload());
+    final ClientServiceDocument serviceDocument = client.getBinder().getODataServiceDocument(service.getPayload());
     assertNotNull(serviceDocument);
 
     assertTrue(serviceDocument.getEntitySetNames().contains("Order Details"));

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/FilterFactoryTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/FilterFactoryTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/FilterFactoryTest.java
index 1d26f81..3b2c294 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/FilterFactoryTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/FilterFactoryTest.java
@@ -25,7 +25,6 @@ import java.net.URLEncoder;
 import java.util.Calendar;
 import java.util.TimeZone;
 
-import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.uri.FilterArgFactory;
 import org.apache.olingo.client.api.uri.FilterFactory;
 import org.apache.olingo.client.api.uri.URIFilter;
@@ -39,13 +38,8 @@ import org.junit.Test;
 
 public class FilterFactoryTest extends AbstractTest {
 
-  @Override
-  protected ODataClient getClient() {
-    return v4Client;
-  }
-
   private FilterFactory getFilterFactory() {
-    return getClient().getFilterFactory();
+    return client.getFilterFactory();
   }
 
   private FilterArgFactory getFilterArgFactory() {

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/URIBuilderTest.java
----------------------------------------------------------------------
diff --git a/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/URIBuilderTest.java b/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/URIBuilderTest.java
index 2af662f..5f9cc8b 100644
--- a/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/URIBuilderTest.java
+++ b/lib/client-core/src/test/java/org/apache/olingo/client/core/uri/URIBuilderTest.java
@@ -26,32 +26,25 @@ import java.util.Collections;
 import java.util.LinkedHashMap;
 import java.util.Map;
 
-import org.apache.olingo.client.api.ODataClient;
 import org.apache.olingo.client.api.uri.QueryOption;
 import org.apache.olingo.client.api.uri.URIBuilder;
 import org.apache.olingo.client.core.AbstractTest;
-import org.apache.olingo.client.core.uri.ParameterAlias;
 import org.junit.Test;
 
 public class URIBuilderTest extends AbstractTest {
 
   private static final String SERVICE_ROOT = "http://host/service";
 
-  @Override
-  protected ODataClient getClient() {
-    return v4Client;
-  }
-
   @Test
   public void metadata() throws URISyntaxException {
-    final URI uri = getClient().newURIBuilder(SERVICE_ROOT).appendMetadataSegment().build();
+    final URI uri = client.newURIBuilder(SERVICE_ROOT).appendMetadataSegment().build();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/$metadata").build(), uri);
   }
 
   @Test
   public void entity() throws URISyntaxException {
-    final URI uri = getClient().newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("AnEntitySet").
+    final URI uri = client.newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("AnEntitySet").
         appendKeySegment(11).build();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/AnEntitySet(11)").build(), uri);
@@ -59,21 +52,21 @@ public class URIBuilderTest extends AbstractTest {
     final Map<String, Object> multiKey = new LinkedHashMap<String, Object>();
     multiKey.put("OrderId", -10);
     multiKey.put("ProductId", -10);
-    URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendEntitySetSegment("OrderLine").appendKeySegment(multiKey).
         appendPropertySegment("Quantity").appendValueSegment();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
         SERVICE_ROOT + "/OrderLine(OrderId=-10,ProductId=-10)/Quantity/$value").build(), uriBuilder.build());
 
-    uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendEntitySetSegment("Customer").appendKeySegment(-10).
         select("CustomerId", "Name", "Orders").expand("Orders");
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/Customer(-10)").
         addParameter("$select", "CustomerId,Name,Orders").addParameter("$expand", "Orders").build(),
         uriBuilder.build());
 
-    uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendEntitySetSegment("Customer").appendKeySegment(-10).appendNavigationSegment("Orders").appendRefSegment();
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/Customer(-10)/Orders/$ref").build(),
         uriBuilder.build());
@@ -81,7 +74,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void expandWithOptions() throws URISyntaxException {
-    final URI uri = getClient().newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").appendKeySegment(5).
+    final URI uri = client.newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").appendKeySegment(5).
         expandWithOptions("ProductDetails", new LinkedHashMap<QueryOption, Object>() {
           private static final long serialVersionUID = 3109256773218160485L;
 
@@ -96,7 +89,7 @@ public class URIBuilderTest extends AbstractTest {
   }
 
   public void expandWithLevels() throws URISyntaxException {
-    final URI uri = getClient().newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").appendKeySegment(1).
+    final URI uri = client.newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").appendKeySegment(1).
         expandWithOptions("Customer", Collections.<QueryOption, Object> singletonMap(QueryOption.LEVELS, 4)).
         build();
 
@@ -106,11 +99,11 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void count() throws URISyntaxException {
-    URI uri = getClient().newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").count().build();
+    URI uri = client.newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").count().build();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/Products/$count").build(), uri);
 
-    uri = getClient().newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").count(true).build();
+    uri = client.newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").count(true).build();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/Products").
         addParameter("$count", "true").build(), uri);
@@ -118,34 +111,34 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void filter() throws URISyntaxException {
-    final URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("AnEntitySet").
-        filter(getClient().getFilterFactory().lt("VIN", 16));
+    final URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("AnEntitySet").
+        filter(client.getFilterFactory().lt("VIN", 16));
 
     assertEquals("http://host/service/AnEntitySet?%24filter=%28VIN%20lt%2016%29", uriBuilder.build().toASCIIString());
 
-//    assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/AnEntitySet").
-//        addParameter("$filter", "(VIN lt 16)").build(),
-//        uriBuilder.build());
+    //    assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/AnEntitySet").
+    //        addParameter("$filter", "(VIN lt 16)").build(),
+    //        uriBuilder.build());
   }
 
   @Test
   public void filterWithParameter() throws URISyntaxException {
     // http://host/service.svc/Employees?$filter=Region eq @p1&@p1='WA'
-    final URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Employees").
-        filter(getClient().getFilterFactory().eq("Region", new ParameterAlias("p1"))).
+    final URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Employees").
+        filter(client.getFilterFactory().eq("Region", new ParameterAlias("p1"))).
         addParameterAlias("p1", "'WA'");
 
     assertEquals("http://host/service/Employees?%24filter=%28Region%20eq%20%40p1%29&%40p1='WA'", uriBuilder.build()
         .toASCIIString());
 
-//    assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/Employees").
-//        addParameter("$filter", "(Region eq @p1)").addParameter("@p1", "'WA'").build(),
-//        uriBuilder.build());
+    //    assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/Employees").
+    //        addParameter("$filter", "(Region eq @p1)").addParameter("@p1", "'WA'").build(),
+    //        uriBuilder.build());
   }
 
   @Test
   public void expandMoreThenOnce() throws URISyntaxException {
-    URI uri = getClient().newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").appendKeySegment(5).
+    URI uri = client.newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Products").appendKeySegment(5).
         expand("Orders", "Customers").expand("Info").build();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/Products(5)").
@@ -154,7 +147,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void selectMoreThenOnce() throws URISyntaxException {
-    URI uri = getClient().newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Customers").appendKeySegment(5).
+    URI uri = client.newURIBuilder(SERVICE_ROOT).appendEntitySetSegment("Customers").appendKeySegment(5).
         select("Name", "Surname").expand("Info").select("Gender").build();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(SERVICE_ROOT + "/Customers(5)").
@@ -163,7 +156,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void singleton() throws URISyntaxException {
-    final URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendSingletonSegment("BestProductEverCreated");
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
@@ -172,7 +165,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void entityId() throws URISyntaxException {
-    final URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendEntityIdSegment("Products(0)");
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
@@ -181,7 +174,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void boundAction() throws URISyntaxException {
-    final URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendEntitySetSegment("Categories").appendKeySegment(1).
         appendNavigationSegment("Products").
         appendActionCallSegment("Model.AllOrders");
@@ -189,10 +182,10 @@ public class URIBuilderTest extends AbstractTest {
     assertEquals(new org.apache.http.client.utils.URIBuilder(
         SERVICE_ROOT + "/Categories(1)/Products/Model.AllOrders").build(), uriBuilder.build());
   }
-  
+
   @Test
   public void boundOperation() throws URISyntaxException {
-    final URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendEntitySetSegment("Categories").appendKeySegment(1).
         appendNavigationSegment("Products").
         appendOperationCallSegment("Model.AllOrders");
@@ -203,14 +196,14 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void ref() throws URISyntaxException {
-    URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendEntitySetSegment("Categories").appendKeySegment(1).
         appendNavigationSegment("Products").appendRefSegment();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
         SERVICE_ROOT + "/Categories(1)/Products/$ref").build(), uriBuilder.build());
 
-    uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendEntitySetSegment("Categories").appendKeySegment(1).
         appendNavigationSegment("Products").appendRefSegment().id("../../Products(0)");
 
@@ -221,7 +214,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void derived() throws URISyntaxException {
-    final URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendEntitySetSegment("Customers").appendDerivedEntityTypeSegment("Model.VipCustomer").appendKeySegment(1);
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
@@ -230,7 +223,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void crossjoin() throws URISyntaxException {
-    final URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendCrossjoinSegment("Products", "Sales");
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
@@ -239,7 +232,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void all() throws URISyntaxException {
-    final URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).appendAllSegment();
+    final URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).appendAllSegment();
 
     assertEquals(new org.apache.http.client.utils.URIBuilder(
         SERVICE_ROOT + "/$all").build(), uriBuilder.build());
@@ -247,7 +240,7 @@ public class URIBuilderTest extends AbstractTest {
 
   @Test
   public void search() throws URISyntaxException {
-    final URIBuilder uriBuilder = getClient().newURIBuilder(SERVICE_ROOT).
+    final URIBuilder uriBuilder = client.newURIBuilder(SERVICE_ROOT).
         appendEntitySetSegment("Products").search("blue OR green");
 
     assertEquals(new URI("http://host/service/Products?%24search=blue%20OR%20green"), uriBuilder.build());

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/Geospatial.java
----------------------------------------------------------------------
diff --git a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/Geospatial.java b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/Geospatial.java
index 63d8b3f..860cbcc 100644
--- a/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/Geospatial.java
+++ b/lib/commons-api/src/main/java/org/apache/olingo/commons/api/edm/geo/Geospatial.java
@@ -72,7 +72,6 @@ public abstract class Geospatial {
      * The OGIS geometry type number for feature collections.
      */
     GEOSPATIALCOLLECTION
-
   }
 
   protected final Dimension dimension;
@@ -87,8 +86,8 @@ public abstract class Geospatial {
   /**
    * Constructor.
    *
-   * @param dimension dimension.
-   * @param type type.
+   * @param dimension dimension
+   * @param type type
    * @param srid SRID
    */
   protected Geospatial(final Dimension dimension, final Type type, final SRID srid) {
@@ -129,7 +128,7 @@ public abstract class Geospatial {
 
   /**
    * Returns the {@link EdmPrimitiveTypeKind}
-   * @return Edm primitve type kind
+   * @return EDM primitive type kind
    */
   public abstract EdmPrimitiveTypeKind getEdmPrimitiveTypeKind();
 }

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmNavigationPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmNavigationPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmNavigationPropertyImpl.java
index bf5dbc6..05abab9 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmNavigationPropertyImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmNavigationPropertyImpl.java
@@ -23,7 +23,6 @@ import java.util.Collections;
 import java.util.List;
 
 import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmElement;
 import org.apache.olingo.commons.api.edm.EdmEntityType;
 import org.apache.olingo.commons.api.edm.EdmException;
 import org.apache.olingo.commons.api.edm.EdmNavigationProperty;
@@ -32,7 +31,7 @@ import org.apache.olingo.commons.api.edm.EdmStructuredType;
 import org.apache.olingo.commons.api.edm.provider.CsdlNavigationProperty;
 import org.apache.olingo.commons.api.edm.provider.CsdlReferentialConstraint;
 
-public class EdmNavigationPropertyImpl extends AbstractEdmNamed implements EdmElement, EdmNavigationProperty {
+public class EdmNavigationPropertyImpl extends AbstractEdmNamed implements EdmNavigationProperty {
 
   private final CsdlNavigationProperty navigationProperty;
   private List<EdmReferentialConstraint> referentialConstraints;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmParameterImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmParameterImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmParameterImpl.java
index 69af130..2f67761 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmParameterImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmParameterImpl.java
@@ -19,7 +19,6 @@
 package org.apache.olingo.commons.core.edm;
 
 import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmElement;
 import org.apache.olingo.commons.api.edm.EdmException;
 import org.apache.olingo.commons.api.edm.EdmMapping;
 import org.apache.olingo.commons.api.edm.EdmParameter;
@@ -27,7 +26,7 @@ import org.apache.olingo.commons.api.edm.EdmType;
 import org.apache.olingo.commons.api.edm.geo.SRID;
 import org.apache.olingo.commons.api.edm.provider.CsdlParameter;
 
-public class EdmParameterImpl extends AbstractEdmNamed implements EdmParameter, EdmElement {
+public class EdmParameterImpl extends AbstractEdmNamed implements EdmParameter {
 
   private final CsdlParameter parameter;
   private EdmType typeImpl;

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmPropertyImpl.java
----------------------------------------------------------------------
diff --git a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmPropertyImpl.java b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmPropertyImpl.java
index 5385d8a..67d0a21 100644
--- a/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmPropertyImpl.java
+++ b/lib/commons-core/src/main/java/org/apache/olingo/commons/core/edm/EdmPropertyImpl.java
@@ -19,7 +19,6 @@
 package org.apache.olingo.commons.core.edm;
 
 import org.apache.olingo.commons.api.edm.Edm;
-import org.apache.olingo.commons.api.edm.EdmElement;
 import org.apache.olingo.commons.api.edm.EdmException;
 import org.apache.olingo.commons.api.edm.EdmMapping;
 import org.apache.olingo.commons.api.edm.EdmProperty;
@@ -27,7 +26,7 @@ import org.apache.olingo.commons.api.edm.EdmType;
 import org.apache.olingo.commons.api.edm.geo.SRID;
 import org.apache.olingo.commons.api.edm.provider.CsdlProperty;
 
-public class EdmPropertyImpl extends AbstractEdmNamed implements EdmProperty, EdmElement {
+public class EdmPropertyImpl extends AbstractEdmNamed implements EdmProperty {
 
   private final CsdlProperty property;
   private EdmTypeInfo typeInfo;
@@ -59,7 +58,7 @@ public class EdmPropertyImpl extends AbstractEdmNamed implements EdmProperty, Ed
     if (property.getType() == null) {
       throw new EdmException("Property " + property.getName() + " must hava a full qualified type.");
     }
-    typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(property.getType().toString()).build();
+    typeInfo = new EdmTypeInfo.Builder().setEdm(edm).setTypeExpression(property.getType()).build();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchFacadeImpl.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchFacadeImpl.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchFacadeImpl.java
index 9fe52c8..98bf563 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchFacadeImpl.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchFacadeImpl.java
@@ -33,20 +33,26 @@ import org.apache.olingo.server.core.deserializer.batch.BatchParserCommon;
 public class BatchFacadeImpl implements BatchFacade {
   private final BatchPartHandler partHandler;
 
-  public BatchFacadeImpl(final ODataHandler oDataHandler, final ODataRequest request,
-      final BatchProcessor batchProcessor, final boolean isStrict) {
+  /**
+   * Creates a new BatchFacade.
+   * @param oDataHandler   handler
+   * @param batchProcessor batch processor
+   * @param isStrict       mode switch (currently not used)
+   */
+  public BatchFacadeImpl(final ODataHandler oDataHandler, final BatchProcessor batchProcessor,
+      final boolean isStrict) {
     partHandler = new BatchPartHandler(oDataHandler, batchProcessor, this);
   }
 
   @Override
-  public ODataResponse handleODataRequest(final ODataRequest request) throws ODataApplicationException,
-  ODataLibraryException {
+  public ODataResponse handleODataRequest(final ODataRequest request)
+      throws ODataApplicationException, ODataLibraryException {
     return partHandler.handleODataRequest(request);
   }
 
   @Override
-  public ODataResponsePart handleBatchRequest(final BatchRequestPart request) throws ODataApplicationException,
-  ODataLibraryException {
+  public ODataResponsePart handleBatchRequest(final BatchRequestPart request)
+      throws ODataApplicationException, ODataLibraryException {
     return partHandler.handleBatchRequest(request);
   }
 

http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/5d7c1287/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchHandler.java
----------------------------------------------------------------------
diff --git a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchHandler.java b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchHandler.java
index ca253dc..121734e 100644
--- a/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchHandler.java
+++ b/lib/server-core/src/main/java/org/apache/olingo/server/core/batchhandler/BatchHandler.java
@@ -46,7 +46,7 @@ public class BatchHandler {
       throws ODataApplicationException, ODataLibraryException {
     validateRequest(request);
 
-    final BatchFacade operation = new BatchFacadeImpl(oDataHandler, request, batchProcessor, isStrict);
+    final BatchFacade operation = new BatchFacadeImpl(oDataHandler, batchProcessor, isStrict);
     batchProcessor.processBatch(operation, request, response);
   }
 


Mime
View raw message