diff --git a/co-simulation/fed/mosaic-carma-cloud/src/test/java/org/eclipse/mosaic/fed/carmacloud/ambassador/CarmaCloudMessageAmbassadorTest.java b/co-simulation/fed/mosaic-carma-cloud/src/test/java/org/eclipse/mosaic/fed/carmacloud/ambassador/CarmaCloudMessageAmbassadorTest.java index 54374c48..ce4048ec 100644 --- a/co-simulation/fed/mosaic-carma-cloud/src/test/java/org/eclipse/mosaic/fed/carmacloud/ambassador/CarmaCloudMessageAmbassadorTest.java +++ b/co-simulation/fed/mosaic-carma-cloud/src/test/java/org/eclipse/mosaic/fed/carmacloud/ambassador/CarmaCloudMessageAmbassadorTest.java @@ -115,14 +115,8 @@ public void testInitialize() throws InternalFederateException, IllegalValueExcep @Test public void testProcessInteraction() throws InternalFederateException { - Interaction interactionMock = new Interaction(13L, 999) // anonymous inner class - { - @Override - public String getTypeId() - { - return "testProcessInteraction"; - } - }; + Interaction interactionMock = mock(Interaction.class); + when(receiverMock.getTypeId()).thenReturn("testProcessInteraction"); ambassador.processInteraction(interactionMock); verify(interactionMock).getTypeId(); verify(interactionMock).getTime();