diff options
author | Jim Hahn <jrh3@att.com> | 2020-01-10 17:52:57 -0500 |
---|---|---|
committer | Jim Hahn <jrh3@att.com> | 2020-01-10 18:43:39 -0500 |
commit | 93fb25deaadd3df511844fdf735c35cff51b4364 (patch) | |
tree | 1e0353ac32e3eaca2671a3b42b3e1181fc8b95ac /models-sim/models-sim-dmaap | |
parent | 754f9a02943058dc03337c9550e8f37fece14d25 (diff) |
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 <jrh3@att.com>
Change-Id: Ia254c1ed21f847d1824e7abc22528975372ee2b6
Diffstat (limited to 'models-sim/models-sim-dmaap')
-rw-r--r-- | models-sim/models-sim-dmaap/src/test/java/org/onap/policy/models/sim/dmaap/provider/DmaapSimProviderTest.java | 11 |
1 files changed, 5 insertions, 6 deletions
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<List<Object>> listCaptor; + @Captor + private ArgumentCaptor<List<Object>> 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 |