diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java index 9450d29a3..82660eb34 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v3/EntityUpdateTestITCase.java @@ -24,7 +24,7 @@ import static org.junit.Assert.assertNotNull; import java.lang.reflect.Proxy; import org.apache.commons.lang3.StringUtils; -import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler; +import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler; import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice. types.ConcurrencyInfo; import org.apache.olingo.fit.proxy.v3.staticservice.microsoft.test.odata.services.astoriadefaultservice. @@ -113,7 +113,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase { @Test public void concurrentModification() { Product product = container.getProduct().get(-10); - final String etag = ((EntityInvocationHandler) Proxy.getInvocationHandler(product)).getETag(); + final String etag = ((EntityTypeInvocationHandler) Proxy.getInvocationHandler(product)).getETag(); assertTrue(StringUtils.isNotBlank(etag)); final String baseConcurrency = String.valueOf(System.currentTimeMillis()); diff --git a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java index 943eda60d..cd00901ce 100644 --- a/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java +++ b/fit/src/test/java/org/apache/olingo/fit/proxy/v4/EntityUpdateTestITCase.java @@ -18,24 +18,20 @@ */ package org.apache.olingo.fit.proxy.v4; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; - import java.lang.reflect.Proxy; import java.math.BigDecimal; -import java.util.UUID; import org.apache.commons.lang3.StringUtils; -import org.apache.olingo.ext.proxy.commons.EntityInvocationHandler; +import org.apache.olingo.ext.proxy.commons.EntityTypeInvocationHandler; import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Address; import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Order; import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderCollection; import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Customer; import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetail; import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.OrderDetailKey; -import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types. - PaymentInstrument; import org.apache.olingo.fit.proxy.v4.staticservice.microsoft.test.odata.services.odatawcfservice.types.Person; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import org.junit.Test; /** @@ -109,7 +105,7 @@ public class EntityUpdateTestITCase extends AbstractTestITCase { @Test public void concurrentModification() { Order order = container.getOrders().get(8); - final String etag = ((EntityInvocationHandler) Proxy.getInvocationHandler(order)).getETag(); + final String etag = ((EntityTypeInvocationHandler) Proxy.getInvocationHandler(order)).getETag(); assertTrue(StringUtils.isNotBlank(etag)); order.setShelfLife(BigDecimal.TEN); @@ -119,17 +115,4 @@ public class EntityUpdateTestITCase extends AbstractTestITCase { order = container.getOrders().get(8); assertEquals(BigDecimal.TEN, order.getShelfLife()); } - - @Test - public void contained() { - PaymentInstrument instrument = container.getAccounts().get(101).getMyPaymentInstruments().get(101901); - - final String newName = UUID.randomUUID().toString(); - instrument.setFriendlyName(newName); - - container.flush(); - - instrument = container.getAccounts().get(101).getMyPaymentInstruments().get(101901); - assertEquals(newName, instrument.getFriendlyName()); - } }