import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.eq;
assertTrue(oper.operator.isAlive());
}
- @Test
- public void testMakeContext() {
- oper.makeContext();
-
- assertTrue(oper.enrichment.isEmpty());
-
- assertSame(BasicBidirectionalTopicOperation.REQ_ID, oper.event.getRequestId());
- assertSame(oper.enrichment, oper.event.getAai());
-
- assertSame(oper.event, oper.context.getEvent());
-
- assertSame(oper.context, oper.params.getContext());
- assertSame(oper.service, oper.params.getActorService());
- assertSame(oper.executor, oper.params.getExecutor());
- assertEquals(ACTOR, oper.params.getActor());
- assertEquals(OPERATION, oper.params.getOperation());
- assertEquals(BasicBidirectionalTopicOperation.TARGET_ENTITY, oper.params.getTargetEntity());
- }
-
- @Test
- public void testMakePayload() {
- assertNull(oper.makePayload());
- }
-
@Test
public void testInitOperator() {
oper.initOperator();
assertSame(oper.topicParams, oper.operator.getParams());
}
- @Test
- public void testMakeEnrichment() {
- assertTrue(oper.makeEnrichment().isEmpty());
- }
-
@Test
public void testProvideResponse() {
String response = "{\"input\": 10}";