From 93fb25deaadd3df511844fdf735c35cff51b4364 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 10 Jan 2020 17:52:57 -0500 Subject: Remove deprecated methods from models Addressed the following issues related to the java 11 upgrade: - forClass().newInstance() - java.xml.bind no longer included in jdk - new mockito doesn't clear captured lists Issue-ID: POLICY-1406 Signed-off-by: Jim Hahn Change-Id: Ia254c1ed21f847d1824e7abc22528975372ee2b6 --- .../models/sim/dmaap/provider/DmaapSimProviderTest.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'models-sim/models-sim-dmaap') diff --git a/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java b/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java index 30fd7805f..4b9549a52 100644 --- a/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java +++ b/models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java @@ -42,7 +42,6 @@ import javax.ws.rs.core.Response; import javax.ws.rs.core.Response.Status; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.mockito.ArgumentCaptor; import org.mockito.Captor; @@ -78,6 +77,9 @@ public class DmaapSimProviderTest { @Captor private ArgumentCaptor> listCaptor; + @Captor + private ArgumentCaptor> listCaptor2; + /** * Sets up. */ @@ -145,7 +147,6 @@ public class DmaapSimProviderTest { } @Test - @Ignore public void testProcessDmaapMessagePut_Single() throws CoderException { prov = spy(new MyProvider(params)); @@ -169,14 +170,12 @@ public class DmaapSimProviderTest { verify(prov).makeTopicData(TOPIC2); // should process all writes as singleton lists - listCaptor.getAllValues().clear(); verify(data1, times(2)).write(listCaptor.capture()); assertEquals(Collections.singletonList(value1), listCaptor.getAllValues().get(0)); assertEquals(Collections.singletonList(value2), listCaptor.getAllValues().get(1)); - listCaptor.getAllValues().clear(); - verify(data2).write(listCaptor.capture()); - assertEquals(Collections.singletonList(value2), listCaptor.getAllValues().get(0)); + verify(data2).write(listCaptor2.capture()); + assertEquals(Collections.singletonList(value2), listCaptor2.getAllValues().get(0)); } @Test -- cgit 1.2.3-korg