You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2013/09/20 15:33:36 UTC
[14/59] [abbrv] Cleanup of core
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlLinksEntityProducerTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlLinksEntityProducerTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlLinksEntityProducerTest.java
index 8fa36ff..76c0536 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlLinksEntityProducerTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlLinksEntityProducerTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlMetadataProducerTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlMetadataProducerTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlMetadataProducerTest.java
index 6cf9a8f..2e8ad58 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlMetadataProducerTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlMetadataProducerTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
@@ -95,18 +95,23 @@ public class XmlMetadataProducerTest extends AbstractXmlProducerTestHelper {
List<Schema> schemas = new ArrayList<Schema>();
List<AnnotationElement> childElements = new ArrayList<AnnotationElement>();
- childElements.add(new AnnotationElement().setName("schemaElementTest2").setText("text2").setNamespace("namespace1"));
+ childElements
+ .add(new AnnotationElement().setName("schemaElementTest2").setText("text2").setNamespace("namespace1"));
List<AnnotationAttribute> elementAttributes = new ArrayList<AnnotationAttribute>();
elementAttributes.add(new AnnotationAttribute().setName("rel").setText("self"));
- elementAttributes.add(new AnnotationAttribute().setName("href").setText("http://google.com").setPrefix("pre").setNamespace("namespaceForAnno"));
+ elementAttributes.add(new AnnotationAttribute().setName("href").setText("http://google.com").setPrefix("pre")
+ .setNamespace("namespaceForAnno"));
List<AnnotationElement> element3List = new ArrayList<AnnotationElement>();
- element3List.add(new AnnotationElement().setName("schemaElementTest4").setText("text4").setAttributes(elementAttributes));
- childElements.add(new AnnotationElement().setName("schemaElementTest3").setText("text3").setPrefix("prefix").setNamespace("namespace2").setChildElements(element3List));
+ element3List.add(new AnnotationElement().setName("schemaElementTest4").setText("text4").setAttributes(
+ elementAttributes));
+ childElements.add(new AnnotationElement().setName("schemaElementTest3").setText("text3").setPrefix("prefix")
+ .setNamespace("namespace2").setChildElements(element3List));
List<AnnotationElement> schemaElements = new ArrayList<AnnotationElement>();
- schemaElements.add(new AnnotationElement().setName("schemaElementTest1").setText("text1").setChildElements(childElements));
+ schemaElements.add(new AnnotationElement().setName("schemaElementTest1").setText("text1").setChildElements(
+ childElements));
schemaElements.add(new AnnotationElement().setName("test"));
Schema schema = new Schema().setAnnotationElements(schemaElements);
@@ -135,7 +140,10 @@ public class XmlMetadataProducerTest extends AbstractXmlProducerTestHelper {
assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/a:schemaElementTest1", metadata);
assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/a:schemaElementTest1/b:schemaElementTest2", metadata);
assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/a:schemaElementTest1/prefix:schemaElementTest3", metadata);
- assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/a:schemaElementTest1/prefix:schemaElementTest3/a:schemaElementTest4[@rel=\"self\" and @pre:href=\"http://google.com\"]", metadata);
+ assertXpathExists(
+ "/edmx:Edmx/edmx:DataServices/a:Schema/a:schemaElementTest1/prefix:schemaElementTest3/" +
+ "a:schemaElementTest4[@rel=\"self\" and @pre:href=\"http://google.com\"]",
+ metadata);
}
@@ -177,7 +185,7 @@ public class XmlMetadataProducerTest extends AbstractXmlProducerTestHelper {
assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/a:test", metadata);
}
- //Elements with namespace and attributes without namespace
+ // Elements with namespace and attributes without namespace
@Test
public void writeValidMetadata4() throws Exception {
@@ -188,8 +196,10 @@ public class XmlMetadataProducerTest extends AbstractXmlProducerTestHelper {
attributesElement1.add(new AnnotationAttribute().setName("href").setText("link"));
List<AnnotationElement> schemaElements = new ArrayList<AnnotationElement>();
- schemaElements.add(new AnnotationElement().setName("schemaElementTest1").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
- schemaElements.add(new AnnotationElement().setName("schemaElementTest2").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
+ schemaElements.add(new AnnotationElement().setName("schemaElementTest1").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
+ schemaElements.add(new AnnotationElement().setName("schemaElementTest2").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
Schema schema = new Schema().setAnnotationElements(schemaElements);
schema.setNamespace("http://namespace.com");
@@ -215,19 +225,23 @@ public class XmlMetadataProducerTest extends AbstractXmlProducerTestHelper {
assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/atom:schemaElementTest2", metadata);
}
- //Element with namespace and attributes with same namespace
+ // Element with namespace and attributes with same namespace
@Test
public void writeValidMetadata5() throws Exception {
List<Schema> schemas = new ArrayList<Schema>();
List<AnnotationAttribute> attributesElement1 = new ArrayList<AnnotationAttribute>();
- attributesElement1.add(new AnnotationAttribute().setName("rel").setText("self").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom"));
- attributesElement1.add(new AnnotationAttribute().setName("href").setText("link").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom"));
+ attributesElement1.add(new AnnotationAttribute().setName("rel").setText("self").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom"));
+ attributesElement1.add(new AnnotationAttribute().setName("href").setText("link").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom"));
List<AnnotationElement> schemaElements = new ArrayList<AnnotationElement>();
- schemaElements.add(new AnnotationElement().setName("schemaElementTest1").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
- schemaElements.add(new AnnotationElement().setName("schemaElementTest2").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
+ schemaElements.add(new AnnotationElement().setName("schemaElementTest1").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
+ schemaElements.add(new AnnotationElement().setName("schemaElementTest2").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
Schema schema = new Schema().setAnnotationElements(schemaElements);
schema.setNamespace("http://namespace.com");
@@ -253,22 +267,27 @@ public class XmlMetadataProducerTest extends AbstractXmlProducerTestHelper {
assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/atom:schemaElementTest2", metadata);
}
- //Element with namespace childelements with same namespace
+ // Element with namespace childelements with same namespace
@Test
public void writeValidMetadata6() throws Exception {
List<Schema> schemas = new ArrayList<Schema>();
List<AnnotationAttribute> attributesElement1 = new ArrayList<AnnotationAttribute>();
- attributesElement1.add(new AnnotationAttribute().setName("rel").setText("self").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom"));
- attributesElement1.add(new AnnotationAttribute().setName("href").setText("link").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom"));
+ attributesElement1.add(new AnnotationAttribute().setName("rel").setText("self").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom"));
+ attributesElement1.add(new AnnotationAttribute().setName("href").setText("link").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom"));
List<AnnotationElement> elementElements = new ArrayList<AnnotationElement>();
- elementElements.add(new AnnotationElement().setName("schemaElementTest2").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
- elementElements.add(new AnnotationElement().setName("schemaElementTest3").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
+ elementElements.add(new AnnotationElement().setName("schemaElementTest2").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
+ elementElements.add(new AnnotationElement().setName("schemaElementTest3").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom").setAttributes(attributesElement1));
List<AnnotationElement> schemaElements = new ArrayList<AnnotationElement>();
- schemaElements.add(new AnnotationElement().setName("schemaElementTest1").setPrefix("atom").setNamespace("http://www.w3.org/2005/Atom").setAttributes(attributesElement1).setChildElements(elementElements));
+ schemaElements.add(new AnnotationElement().setName("schemaElementTest1").setPrefix("atom").setNamespace(
+ "http://www.w3.org/2005/Atom").setAttributes(attributesElement1).setChildElements(elementElements));
Schema schema = new Schema().setAnnotationElements(schemaElements);
schema.setNamespace("http://namespace.com");
@@ -291,11 +310,13 @@ public class XmlMetadataProducerTest extends AbstractXmlProducerTestHelper {
XMLUnit.setXpathNamespaceContext(ctx);
assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/atom:schemaElementTest1", metadata);
- assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/atom:schemaElementTest1/atom:schemaElementTest2", metadata);
- assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/atom:schemaElementTest1/atom:schemaElementTest3", metadata);
+ assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/atom:schemaElementTest1/atom:schemaElementTest2",
+ metadata);
+ assertXpathExists("/edmx:Edmx/edmx:DataServices/a:Schema/atom:schemaElementTest1/atom:schemaElementTest3",
+ metadata);
}
- //If no name for an AnnotationAttribute is set this has to result in an Exception
+ // If no name for an AnnotationAttribute is set this has to result in an Exception
@Test(expected = Exception.class)
public void writeInvalidMetadata() throws Exception {
disableLogging(this.getClass());
@@ -315,28 +336,33 @@ public class XmlMetadataProducerTest extends AbstractXmlProducerTestHelper {
XmlMetadataProducer.writeMetadata(data, xmlStreamWriter, null);
}
- //Element with predefined namespace
+ // Element with predefined namespace
@Test
public void writeWithPredefinedNamespaces() throws Exception {
- //prepare
+ // prepare
List<Schema> schemas = new ArrayList<Schema>();
List<AnnotationAttribute> attributesElement1 = new ArrayList<AnnotationAttribute>();
- attributesElement1.add(new AnnotationAttribute().setName("rel").setText("self").setPrefix("foo").setNamespace("http://www.foo.bar/Protocols/Data"));
- attributesElement1.add(new AnnotationAttribute().setName("href").setText("link").setPrefix("foo").setNamespace("http://www.foo.bar/Protocols/Data"));
+ attributesElement1.add(new AnnotationAttribute().setName("rel").setText("self").setPrefix("foo").setNamespace(
+ "http://www.foo.bar/Protocols/Data"));
+ attributesElement1.add(new AnnotationAttribute().setName("href").setText("link").setPrefix("foo").setNamespace(
+ "http://www.foo.bar/Protocols/Data"));
List<AnnotationElement> elementElements = new ArrayList<AnnotationElement>();
- elementElements.add(new AnnotationElement().setName("schemaElementTest2").setPrefix("foo").setNamespace("http://www.foo.bar/Protocols/Data").setAttributes(attributesElement1));
- elementElements.add(new AnnotationElement().setName("schemaElementTest3").setPrefix("foo").setNamespace("http://www.foo.bar/Protocols/Data").setAttributes(attributesElement1));
+ elementElements.add(new AnnotationElement().setName("schemaElementTest2").setPrefix("foo").setNamespace(
+ "http://www.foo.bar/Protocols/Data").setAttributes(attributesElement1));
+ elementElements.add(new AnnotationElement().setName("schemaElementTest3").setPrefix("foo").setNamespace(
+ "http://www.foo.bar/Protocols/Data").setAttributes(attributesElement1));
List<AnnotationElement> schemaElements = new ArrayList<AnnotationElement>();
- schemaElements.add(new AnnotationElement().setName("schemaElementTest1").setPrefix("foo").setNamespace("http://www.foo.bar/Protocols/Data").setAttributes(attributesElement1).setChildElements(elementElements));
+ schemaElements.add(new AnnotationElement().setName("schemaElementTest1").setPrefix("foo").setNamespace(
+ "http://www.foo.bar/Protocols/Data").setAttributes(attributesElement1).setChildElements(elementElements));
Schema schema = new Schema().setAnnotationElements(schemaElements);
schema.setNamespace("http://namespace.com");
schemas.add(schema);
- //Execute
+ // Execute
Map<String, String> predefinedNamespaces = new HashMap<String, String>();
predefinedNamespaces.put("foo", "http://www.foo.bar/Protocols/Data");
DataServices data = new DataServices().setSchemas(schemas).setDataServiceVersion(ODataServiceVersion.V20);
@@ -347,7 +373,7 @@ public class XmlMetadataProducerTest extends AbstractXmlProducerTestHelper {
XmlMetadataProducer.writeMetadata(data, xmlStreamWriter, predefinedNamespaces);
String metadata = StringHelper.inputStreamToString(csb.getInputStream());
- //Verify
+ // Verify
Map<String, String> prefixMap = new HashMap<String, String>();
prefixMap.put("edmx", "http://schemas.microsoft.com/ado/2007/06/edmx");
prefixMap.put("a", "http://schemas.microsoft.com/ado/2008/09/edm");
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlPropertyProducerTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlPropertyProducerTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlPropertyProducerTest.java
index 06690d1..c04b9c4 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlPropertyProducerTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlPropertyProducerTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
@@ -54,7 +54,6 @@ public class XmlPropertyProducerTest extends AbstractProviderTest {
ODataResponse response = s.writeProperty(edmProperty, employeeData.get("EmployeeId"));
assertNotNull(response);
assertNotNull(response.getEntity());
-
String xml = StringHelper.inputStreamToString((InputStream) response.getEntity());
assertNotNull(xml);
@@ -73,7 +72,7 @@ public class XmlPropertyProducerTest extends AbstractProviderTest {
ODataResponse response = s.writeProperty(edmProperty, employeeData.get("Age"));
assertNotNull(response);
assertNotNull(response.getEntity());
-
+
String xml = StringHelper.inputStreamToString((InputStream) response.getEntity());
assertNotNull(xml);
@@ -91,7 +90,7 @@ public class XmlPropertyProducerTest extends AbstractProviderTest {
ODataResponse response = s.writeProperty(edmProperty, employeeData.get("ImageUrl"));
assertNotNull(response);
assertNotNull(response.getEntity());
-
+
String xml = StringHelper.inputStreamToString((InputStream) response.getEntity());
assertNotNull(xml);
@@ -102,12 +101,13 @@ public class XmlPropertyProducerTest extends AbstractProviderTest {
@Test
public void serializeImage() throws Exception {
- final EdmProperty property = (EdmProperty) MockFacade.getMockEdm().getEntityType("RefScenario2", "Photo").getProperty("Image");
+ final EdmProperty property =
+ (EdmProperty) MockFacade.getMockEdm().getEntityType("RefScenario2", "Photo").getProperty("Image");
ODataResponse response = createAtomEntityProvider().writeProperty(property, photoData.get("Image"));
assertNotNull(response);
assertNotNull(response.getEntity());
assertNull("EntityProvider should not set content header", response.getContentHeader());
-
+
final String xml = StringHelper.inputStreamToString((InputStream) response.getEntity());
assertNotNull(xml);
assertXpathExists("/d:Image", xml);
@@ -117,12 +117,13 @@ public class XmlPropertyProducerTest extends AbstractProviderTest {
@Test
public void serializeBinaryData() throws Exception {
- final EdmProperty property = (EdmProperty) MockFacade.getMockEdm().getEntityType("RefScenario2", "Photo").getProperty("BinaryData");
+ final EdmProperty property =
+ (EdmProperty) MockFacade.getMockEdm().getEntityType("RefScenario2", "Photo").getProperty("BinaryData");
ODataResponse response = createAtomEntityProvider().writeProperty(property, photoData.get("BinaryData"));
assertNotNull(response);
assertNotNull(response.getEntity());
assertNull("EntityProvider should not set content header", response.getContentHeader());
-
+
final String xml = StringHelper.inputStreamToString((InputStream) response.getEntity());
assertNotNull(xml);
assertXpathExists("/d:BinaryData", xml);
@@ -141,7 +142,7 @@ public class XmlPropertyProducerTest extends AbstractProviderTest {
ODataResponse response = s.writeProperty(edmProperty, employeeData.get("Location"));
assertNotNull(response);
assertNotNull(response.getEntity());
-
+
String xml = StringHelper.inputStreamToString((InputStream) response.getEntity());
assertNotNull(xml);
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlSelectProducerTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlSelectProducerTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlSelectProducerTest.java
index b762e68..8eb635c 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlSelectProducerTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/producer/XmlSelectProducerTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.producer;
@@ -64,7 +64,9 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
@Test
public void allPropertiesNoSelect() throws Exception {
AtomEntityProvider provider = createAtomEntityProvider();
- ODataResponse response = provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"), employeeData, DEFAULT_PROPERTIES);
+ ODataResponse response =
+ provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
+ employeeData, DEFAULT_PROPERTIES);
String xmlString = verifyResponse(response);
@@ -79,9 +81,12 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
public void allPropertiesSelectStar() throws Exception {
ExpandSelectTreeNode selectTree = getSelectExpandTree("*", null);
- EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
+ EntityProviderWriteProperties properties =
+ EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
AtomEntityProvider provider = createAtomEntityProvider();
- ODataResponse response = provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"), employeeData, properties);
+ ODataResponse response =
+ provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
+ employeeData, properties);
String xmlString = verifyResponse(response);
@@ -96,9 +101,12 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
public void selectEmployeeId() throws Exception {
ExpandSelectTreeNode selectTree = getSelectExpandTree("EmployeeId", null);
- EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
+ EntityProviderWriteProperties properties =
+ EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
AtomEntityProvider provider = createAtomEntityProvider();
- ODataResponse response = provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"), employeeData, properties);
+ ODataResponse response =
+ provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
+ employeeData, properties);
String xmlString = verifyResponse(response);
@@ -113,9 +121,12 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
public void selectNavigationProperties() throws Exception {
ExpandSelectTreeNode selectTree = getSelectExpandTree("ne_Team, ne_Manager", null);
- EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
+ EntityProviderWriteProperties properties =
+ EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
AtomEntityProvider provider = createAtomEntityProvider();
- ODataResponse response = provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"), employeeData, properties);
+ ODataResponse response =
+ provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
+ employeeData, properties);
String xmlString = verifyResponse(response);
@@ -130,9 +141,12 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
public void selectComplexProperties() throws Exception {
ExpandSelectTreeNode selectTree = getSelectExpandTree("Location", null);
- EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
+ EntityProviderWriteProperties properties =
+ EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
AtomEntityProvider provider = createAtomEntityProvider();
- ODataResponse response = provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"), employeeData, properties);
+ ODataResponse response =
+ provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
+ employeeData, properties);
String xmlString = verifyResponse(response);
@@ -147,9 +161,12 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
public void selectComplexAndNavigationProperties() throws Exception {
ExpandSelectTreeNode selectTree = getSelectExpandTree("Location, ne_Room", null);
- EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
+ EntityProviderWriteProperties properties =
+ EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
AtomEntityProvider provider = createAtomEntityProvider();
- ODataResponse response = provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"), employeeData, properties);
+ ODataResponse response =
+ provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
+ employeeData, properties);
String xmlString = verifyResponse(response);
@@ -164,9 +181,12 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
public void selectComplexAndNavigationAndKeyProperties() throws Exception {
ExpandSelectTreeNode selectTree = getSelectExpandTree("Location, ne_Room, EmployeeId, TeamId", null);
- EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
+ EntityProviderWriteProperties properties =
+ EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
AtomEntityProvider provider = createAtomEntityProvider();
- ODataResponse response = provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"), employeeData, properties);
+ ODataResponse response =
+ provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
+ employeeData, properties);
String xmlString = verifyResponse(response);
@@ -181,9 +201,12 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
public void selectEmployeeIdEmployeeNameImageUrl() throws Exception {
ExpandSelectTreeNode selectTree = getSelectExpandTree("EmployeeId, EmployeeName, ImageUrl", null);
- EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
+ EntityProviderWriteProperties properties =
+ EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
AtomEntityProvider provider = createAtomEntityProvider();
- ODataResponse response = provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"), employeeData, properties);
+ ODataResponse response =
+ provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
+ employeeData, properties);
String xmlString = verifyResponse(response);
@@ -198,9 +221,12 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
public void selectAge() throws Exception {
ExpandSelectTreeNode selectTree = getSelectExpandTree("Age", null);
- EntityProviderWriteProperties properties = EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
+ EntityProviderWriteProperties properties =
+ EntityProviderWriteProperties.serviceRoot(BASE_URI).expandSelectTree(selectTree).build();
AtomEntityProvider provider = createAtomEntityProvider();
- ODataResponse response = provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"), employeeData, properties);
+ ODataResponse response =
+ provider.writeEntry(MockFacade.getMockEdm().getDefaultEntityContainer().getEntitySet("Employees"),
+ employeeData, properties);
String xmlString = verifyResponse(response);
@@ -211,7 +237,8 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
verifyComplexProperties(xmlString, F);
}
- private void verifyComplexProperties(final String xmlString, final boolean location) throws IOException, SAXException, XpathException {
+ private void verifyComplexProperties(final String xmlString, final boolean location) throws IOException,
+ SAXException, XpathException {
if (location) {
assertXpathExists("/a:entry/m:properties/d:Location", xmlString);
} else {
@@ -219,7 +246,8 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
}
}
- private void verifySingleProperties(final String xmlString, final boolean employeeName, final boolean age, final boolean entryDate, final boolean imageUrl) throws IOException, SAXException, XpathException {
+ private void verifySingleProperties(final String xmlString, final boolean employeeName, final boolean age,
+ final boolean entryDate, final boolean imageUrl) throws IOException, SAXException, XpathException {
if (employeeName) {
assertXpathExists("/a:entry/m:properties/d:EmployeeName", xmlString);
} else {
@@ -242,7 +270,8 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
}
}
- private void verifyKeyProperties(final String xmlString, final boolean employeeId, final boolean managerId, final boolean roomId, final boolean teamId) throws IOException, SAXException, XpathException {
+ private void verifyKeyProperties(final String xmlString, final boolean employeeId, final boolean managerId,
+ final boolean roomId, final boolean teamId) throws IOException, SAXException, XpathException {
if (employeeId) {
assertXpathExists("/a:entry/m:properties/d:EmployeeId", xmlString);
} else {
@@ -265,7 +294,8 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
}
}
- private void verifyNavigationProperties(final String xmlString, final boolean neManager, final boolean neRoom, final boolean neTeam) throws IOException, SAXException, XpathException {
+ private void verifyNavigationProperties(final String xmlString, final boolean neManager, final boolean neRoom,
+ final boolean neTeam) throws IOException, SAXException, XpathException {
if (neManager) {
assertXpathExists("/a:entry/a:link[@href=\"Employees('1')/ne_Manager\" and @title='ne_Manager']", xmlString);
} else {
@@ -291,7 +321,8 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
return xmlString;
}
- private ExpandSelectTreeNode getSelectExpandTree(final String selectString, final String expandString) throws Exception {
+ private ExpandSelectTreeNode getSelectExpandTree(final String selectString, final String expandString)
+ throws Exception {
Edm edm = RuntimeDelegate.createEdm(new EdmTestProvider());
UriParserImpl uriParser = new UriParserImpl(edm);
@@ -308,7 +339,8 @@ public class XmlSelectProducerTest extends AbstractProviderTest {
}
UriInfo uriInfo = uriParser.parse(pathSegments, queryParameters);
- ExpandSelectTreeCreator expandSelectTreeCreator = new ExpandSelectTreeCreator(uriInfo.getSelect(), uriInfo.getExpand());
+ ExpandSelectTreeCreator expandSelectTreeCreator =
+ new ExpandSelectTreeCreator(uriInfo.getSelect(), uriInfo.getExpand());
ExpandSelectTreeNode expandSelectTree = expandSelectTreeCreator.create();
assertNotNull(expandSelectTree);
return expandSelectTree;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/util/CircleStreamBufferTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/util/CircleStreamBufferTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/util/CircleStreamBufferTest.java
index a62c12e..783e675 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/util/CircleStreamBufferTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/util/CircleStreamBufferTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.util;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/util/JsonStreamWriterTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/util/JsonStreamWriterTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/util/JsonStreamWriterTest.java
index 7c494ec..e9dd68f 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/util/JsonStreamWriterTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/ep/util/JsonStreamWriterTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.ep.util;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/MessageReferenceTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/MessageReferenceTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/MessageReferenceTest.java
index e54e672..c0a98c3 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/MessageReferenceTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/MessageReferenceTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.exception;
@@ -59,7 +59,8 @@ public class MessageReferenceTest extends BaseTest {
assertTrue(e.getMessageReference().getContent().contains("content"));
assertTrue(e.getMessageReference().getContent().contains("content_2"));
- ODataMessageException e2 = new UriNotMatchingException(UriNotMatchingException.ENTITYNOTFOUND.addContent("content_3"));
+ ODataMessageException e2 =
+ new UriNotMatchingException(UriNotMatchingException.ENTITYNOTFOUND.addContent("content_3"));
assertEquals(2, e.getMessageReference().getContent().size());
assertTrue(e.getMessageReference().getContent().contains("content"));
assertTrue(e.getMessageReference().getContent().contains("content_2"));
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/MessageServiceTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/MessageServiceTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/MessageServiceTest.java
index b6516cc..553857f 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/MessageServiceTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/MessageServiceTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.exception;
@@ -40,7 +40,10 @@ public class MessageServiceTest extends BaseTest {
MessageReference context = MessageReference.create(ODataMessageException.class, "COMMON");
Message ms = MessageService.getMessage(null, context);
- assertEquals("MessageService could not be created because of exception 'IllegalArgumentException with message 'Parameter locale MUST NOT be NULL.'.", ms.getText());
+ assertEquals(
+ "MessageService could not be created because of exception 'IllegalArgumentException with message " +
+ "'Parameter locale MUST NOT be NULL.'.",
+ ms.getText());
}
@Test
@@ -53,7 +56,8 @@ public class MessageServiceTest extends BaseTest {
@Test
public void testParameter() throws Exception {
- MessageReference context = MessageReference.create(ODataMessageException.class, "ONE_REPLACEMENTS").addContent("first");
+ MessageReference context =
+ MessageReference.create(ODataMessageException.class, "ONE_REPLACEMENTS").addContent("first");
Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context);
assertEquals("Only replacement is [first]!", ms.getText());
@@ -61,15 +65,20 @@ public class MessageServiceTest extends BaseTest {
@Test
public void testOneParameterForTwo() throws Exception {
- MessageReference context = MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first");
+ MessageReference context =
+ MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first");
Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context);
- assertEquals("Missing replacement for place holder in value 'First was [%1$s] and second was [%2$s]!' for following arguments '[first]'!", ms.getText());
+ assertEquals(
+ "Missing replacement for place holder in value 'First was [%1$s] and second was [%2$s]!' " +
+ "for following arguments '[first]'!",
+ ms.getText());
}
@Test
public void testTwoParameters() throws Exception {
- MessageReference context = MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first", "second");
+ MessageReference context =
+ MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first", "second");
Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context);
assertEquals("First was [first] and second was [second]!", ms.getText());
@@ -77,7 +86,9 @@ public class MessageServiceTest extends BaseTest {
@Test
public void testTwoParametersWithTwoAddContent() throws Exception {
- MessageReference context = MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first").addContent("second");
+ MessageReference context =
+ MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first").addContent(
+ "second");
Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context);
assertEquals("First was [first] and second was [second]!", ms.getText());
@@ -85,7 +96,8 @@ public class MessageServiceTest extends BaseTest {
@Test
public void testThreeParametersForTwo() throws Exception {
- MessageReference context = MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first", "second", "third");
+ MessageReference context =
+ MessageReference.create(ODataMessageException.class, "TWO_REPLACEMENTS").addContent("first", "second", "third");
Message ms = MessageService.getMessage(DEFAULT_LANGUAGE, context);
assertEquals("First was [first] and second was [second]!", ms.getText());
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataExceptionTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataExceptionTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataExceptionTest.java
index f785d01..6127605 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataExceptionTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataExceptionTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.exception;
@@ -70,7 +70,8 @@ public class ODataExceptionTest extends BaseTest {
@Test
public void oDataContextedCause() {
- ODataException exception = new ODataException("Some message.", new ODataNotFoundException(ODataNotFoundException.ENTITY));
+ ODataException exception =
+ new ODataException("Some message.", new ODataNotFoundException(ODataNotFoundException.ENTITY));
assertTrue(exception.isCausedByHttpException());
}
@@ -82,8 +83,8 @@ public class ODataExceptionTest extends BaseTest {
assertTrue(exception.isCausedByHttpException());
}
- //The following tests verify whether all fields of type {@link MessageReference} of
- //the tested (Exception) class are provided in the <b>i18n.properties</b> file.
+ // The following tests verify whether all fields of type {@link MessageReference} of
+ // the tested (Exception) class are provided in the <b>i18n.properties</b> file.
@Test
public void messagesOfODataMessageExceptions() {
ODataMessageTextVerifier.TestClass(ODataMessageException.class);
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataMessageTextVerifierTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataMessageTextVerifierTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataMessageTextVerifierTest.java
index 72b214c..28d5c97 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataMessageTextVerifierTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/exception/ODataMessageTextVerifierTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.exception;
@@ -31,7 +31,7 @@ import org.junit.Test;
/**
* This class tests the {@link ODataMessageTextVerifier}
*
- *
+ *
*/
public class ODataMessageTextVerifierTest extends BaseTest {
@@ -45,10 +45,18 @@ public class ODataMessageTextVerifierTest extends BaseTest {
assertEquals("!!!Error in testtool", 2, ec.size());
assertNotNull("!!!Error in testtool", ec.get(0));
- assertEquals("Error", "Error-->Messagetext for key:\"org.apache.olingo.odata2.testutil.mock.SampleClassForInvalidMessageReferences.DOES_NOT_EXIST\" missing", ec.get(0).getMessage());
+ assertEquals(
+ "Error",
+ "Error-->Messagetext for key:\"org.apache.olingo.odata2.testutil.mock.SampleClassForInvalidMessageReferences." +
+ "DOES_NOT_EXIST\" missing",
+ ec.get(0).getMessage());
assertNotNull("!!!Error in testtool", ec.get(1));
- assertEquals("Error", "Error-->Messagetext for key:\"org.apache.olingo.odata2.testutil.mock.SampleClassForInvalidMessageReferences.EXITS_BUT_EMPTY\" empty", ec.get(1).getMessage());
+ assertEquals(
+ "Error",
+ "Error-->Messagetext for key:\"org.apache.olingo.odata2.testutil.mock.SampleClassForInvalidMessageReferences." +
+ "EXITS_BUT_EMPTY\" empty",
+ ec.get(1).getMessage());
}
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/processor/ODataSingleProcessorServiceTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/processor/ODataSingleProcessorServiceTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/processor/ODataSingleProcessorServiceTest.java
index 5ea4af1..c719c0a 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/processor/ODataSingleProcessorServiceTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/processor/ODataSingleProcessorServiceTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.processor;
@@ -147,7 +147,8 @@ public class ODataSingleProcessorServiceTest extends BaseTest {
@Test
public void defaultSupportedContentTypesAndGifForEntityLink() throws Exception {
String ctGif = ContentType.create("image", "gif").toContentTypeString();
- when(((CustomContentType) processor).getCustomContentTypes(EntityLinkProcessor.class)).thenReturn(Arrays.asList(ctGif));
+ when(((CustomContentType) processor).getCustomContentTypes(EntityLinkProcessor.class)).thenReturn(
+ Arrays.asList(ctGif));
List<String> types = service.getSupportedContentTypes(EntityLinkProcessor.class);
assertTrue(types.contains(ctGif));
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataErrorHandlerCallbackImpl.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataErrorHandlerCallbackImpl.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataErrorHandlerCallbackImpl.java
index c2f61dd..c70268c 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataErrorHandlerCallbackImpl.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataErrorHandlerCallbackImpl.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.rest;
@@ -34,7 +34,8 @@ public class ODataErrorHandlerCallbackImpl implements ODataErrorCallback {
@Override
public ODataResponse handleError(final ODataErrorContext context) {
- ODataResponseBuilder responseBuilder = ODataResponse.entity("bla").status(HttpStatusCodes.BAD_REQUEST).contentHeader("text/html");
+ ODataResponseBuilder responseBuilder =
+ ODataResponse.entity("bla").status(HttpStatusCodes.BAD_REQUEST).contentHeader("text/html");
if (context.getRequestUri() != null) {
responseBuilder.header("RequestUri", context.getRequestUri().toASCIIString());
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataExceptionMapperImplTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataExceptionMapperImplTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataExceptionMapperImplTest.java
index dbf9d44..26b06c1 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataExceptionMapperImplTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataExceptionMapperImplTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.rest;
@@ -101,7 +101,8 @@ public class ODataExceptionMapperImplTest extends BaseTest {
value.putSingle("Accept", "AcceptValue");
value.put("AcceptMulti", Arrays.asList("AcceptValue_1", "AcceptValue_2"));
when(exceptionMapper.httpHeaders.getRequestHeaders()).thenReturn(value);
- when(exceptionMapper.servletConfig.getInitParameter(ODataServiceFactory.FACTORY_LABEL)).thenReturn(ODataServiceFactoryImpl.class.getName());
+ when(exceptionMapper.servletConfig.getInitParameter(ODataServiceFactory.FACTORY_LABEL)).thenReturn(
+ ODataServiceFactoryImpl.class.getName());
when(exceptionMapper.servletRequest.getAttribute(ODataServiceFactory.FACTORY_CLASSLOADER_LABEL)).thenReturn(null);
Response response = exceptionMapper.toResponse(new Exception());
@@ -124,8 +125,10 @@ public class ODataExceptionMapperImplTest extends BaseTest {
value.putSingle("Accept", "AcceptValue");
value.put("AcceptMulti", Arrays.asList("AcceptValue_1", "AcceptValue_2"));
when(exceptionMapper.httpHeaders.getRequestHeaders()).thenReturn(value);
- when(exceptionMapper.servletConfig.getInitParameter(ODataServiceFactory.FACTORY_LABEL)).thenReturn(ODataServiceFactoryImpl.class.getName());
- when(exceptionMapper.servletRequest.getAttribute(ODataServiceFactory.FACTORY_CLASSLOADER_LABEL)).thenReturn(ODataServiceFactoryImpl.class.getClassLoader());
+ when(exceptionMapper.servletConfig.getInitParameter(ODataServiceFactory.FACTORY_LABEL)).thenReturn(
+ ODataServiceFactoryImpl.class.getName());
+ when(exceptionMapper.servletRequest.getAttribute(ODataServiceFactory.FACTORY_CLASSLOADER_LABEL)).thenReturn(
+ ODataServiceFactoryImpl.class.getClassLoader());
Response response = exceptionMapper.toResponse(new Exception());
// verify
@@ -203,7 +206,8 @@ public class ODataExceptionMapperImplTest extends BaseTest {
Response response = exceptionMapper.toResponse(exception);
// verify
- verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, ODataNotFoundException.ENTITY).getText(), HttpStatusCodes.NOT_FOUND);
+ verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, ODataNotFoundException.ENTITY).getText(),
+ HttpStatusCodes.NOT_FOUND);
}
@Test
@@ -215,7 +219,8 @@ public class ODataExceptionMapperImplTest extends BaseTest {
Response response = exceptionMapper.toResponse(exception);
// verify
- verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, EntityProviderException.INVALID_PROPERTY.addContent("unknown")).getText(), HttpStatusCodes.BAD_REQUEST);
+ verifyResponse(response, MessageService.getMessage(Locale.ENGLISH,
+ EntityProviderException.INVALID_PROPERTY.addContent("unknown")).getText(), HttpStatusCodes.BAD_REQUEST);
}
@Test
@@ -229,7 +234,8 @@ public class ODataExceptionMapperImplTest extends BaseTest {
Response response = exceptionMapper.toResponse(exception);
// verify
- verifyResponse(response, MessageService.getMessage(Locale.GERMAN, ODataNotFoundException.ENTITY).getText(), HttpStatusCodes.NOT_FOUND);
+ verifyResponse(response, MessageService.getMessage(Locale.GERMAN, ODataNotFoundException.ENTITY).getText(),
+ HttpStatusCodes.NOT_FOUND);
}
@Test
@@ -243,7 +249,8 @@ public class ODataExceptionMapperImplTest extends BaseTest {
Response response = exceptionMapper.toResponse(exception);
// verify
- verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, ODataNotFoundException.ENTITY).getText(), HttpStatusCodes.NOT_FOUND);
+ verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, ODataNotFoundException.ENTITY).getText(),
+ HttpStatusCodes.NOT_FOUND);
}
@Test
@@ -309,19 +316,22 @@ public class ODataExceptionMapperImplTest extends BaseTest {
Response response = exceptionMapper.toResponse(exception);
// verify
- verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, UriSyntaxException.EMPTYSEGMENT).getText(), HttpStatusCodes.BAD_REQUEST);
+ verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, UriSyntaxException.EMPTYSEGMENT).getText(),
+ HttpStatusCodes.BAD_REQUEST);
}
@Test
public void testUriParserExceptionWrapped() throws Exception {
// prepare
- Exception exception = new ODataException("outer exception", new UriSyntaxException(UriSyntaxException.EMPTYSEGMENT));
+ Exception exception =
+ new ODataException("outer exception", new UriSyntaxException(UriSyntaxException.EMPTYSEGMENT));
// execute
Response response = exceptionMapper.toResponse(exception);
// verify
- verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, UriSyntaxException.EMPTYSEGMENT).getText(), HttpStatusCodes.BAD_REQUEST);
+ verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, UriSyntaxException.EMPTYSEGMENT).getText(),
+ HttpStatusCodes.BAD_REQUEST);
}
@Test
@@ -354,7 +364,9 @@ public class ODataExceptionMapperImplTest extends BaseTest {
public void testNotAllowedJaxRsException() throws Exception {
// prepare
String message = "The request dispatcher does not allow the HTTP method used for the request.";
- Exception exception = new NotAllowedException(Response.status(Response.Status.METHOD_NOT_ALLOWED).header(HttpHeaders.ALLOW, "GET").build());
+ Exception exception =
+ new NotAllowedException(Response.status(Response.Status.METHOD_NOT_ALLOWED).header(HttpHeaders.ALLOW, "GET")
+ .build());
// execute
Response response = exceptionMapper.toResponse(exception);
@@ -393,7 +405,8 @@ public class ODataExceptionMapperImplTest extends BaseTest {
// prepare
String errorCode = "ErrorCode";
String message = "expected exception message";
- Exception exception = new ODataApplicationException(message, Locale.ENGLISH, HttpStatusCodes.INTERNAL_SERVER_ERROR, errorCode);
+ Exception exception =
+ new ODataApplicationException(message, Locale.ENGLISH, HttpStatusCodes.INTERNAL_SERVER_ERROR, errorCode);
// execute
Response response = exceptionMapper.toResponse(exception);
@@ -413,13 +426,16 @@ public class ODataExceptionMapperImplTest extends BaseTest {
Response response = exceptionMapper.toResponse(exception);
// verify
- String errorMessage = verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, ODataNotFoundException.ENTITY).getText(), HttpStatusCodes.NOT_FOUND);
+ String errorMessage =
+ verifyResponse(response, MessageService.getMessage(Locale.ENGLISH, ODataNotFoundException.ENTITY).getText(),
+ HttpStatusCodes.NOT_FOUND);
assertXpathEvaluatesTo(errorCode, "/a:error/a:code", errorMessage);
}
@Test
public void testCallback() throws Exception {
- when(exceptionMapper.servletConfig.getInitParameter(ODataServiceFactory.FACTORY_LABEL)).thenReturn(ODataServiceFactoryImpl.class.getName());
+ when(exceptionMapper.servletConfig.getInitParameter(ODataServiceFactory.FACTORY_LABEL)).thenReturn(
+ ODataServiceFactoryImpl.class.getName());
Response response = exceptionMapper.toResponse(new Exception());
// verify
@@ -431,7 +447,8 @@ public class ODataExceptionMapperImplTest extends BaseTest {
assertEquals("text/html", contentTypeHeader);
}
- private String verifyResponse(final Response response, final String message, final HttpStatusCodes statusCode) throws Exception {
+ private String verifyResponse(final Response response, final String message, final HttpStatusCodes statusCode)
+ throws Exception {
assertNotNull(response);
assertEquals(statusCode.getStatusCode(), response.getStatus());
String errorXml = StringHelper.inputStreamToString((InputStream) response.getEntity());
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataServiceFactoryImpl.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataServiceFactoryImpl.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataServiceFactoryImpl.java
index d195296..8604b6a 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataServiceFactoryImpl.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/rest/ODataServiceFactoryImpl.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.rest;
http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/a030e42b/odata-core/src/test/java/org/apache/olingo/odata2/core/rt/RuntimeDelegateTest.java
----------------------------------------------------------------------
diff --git a/odata-core/src/test/java/org/apache/olingo/odata2/core/rt/RuntimeDelegateTest.java b/odata-core/src/test/java/org/apache/olingo/odata2/core/rt/RuntimeDelegateTest.java
index 4e60c41..6eb3559 100644
--- a/odata-core/src/test/java/org/apache/olingo/odata2/core/rt/RuntimeDelegateTest.java
+++ b/odata-core/src/test/java/org/apache/olingo/odata2/core/rt/RuntimeDelegateTest.java
@@ -1,20 +1,20 @@
/*******************************************************************************
* 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
+ * 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
+ * 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.
+ * 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.odata2.core.rt;