diff --git a/connector-sdk/test/src/main/java/io/camunda/connector/test/inbound/InboundConnectorContextBuilder.java b/connector-sdk/test/src/main/java/io/camunda/connector/test/inbound/InboundConnectorContextBuilder.java index bed14edf99..7aeef2a0b8 100644 --- a/connector-sdk/test/src/main/java/io/camunda/connector/test/inbound/InboundConnectorContextBuilder.java +++ b/connector-sdk/test/src/main/java/io/camunda/connector/test/inbound/InboundConnectorContextBuilder.java @@ -55,12 +55,8 @@ public class InboundConnectorContextBuilder { protected DocumentFactory documentFactory = new DocumentFactoryImpl(InMemoryDocumentStore.INSTANCE); protected ObjectMapper objectMapper = - ConnectorsObjectMapperSupplier.getCopy() - .registerModule( - new JacksonModuleDocument( - this.documentFactory, - null, - JacksonModuleDocument.DocumentModuleSettings.create())); + ConnectorsObjectMapperSupplier.getCopy( + this.documentFactory, JacksonModuleDocument.DocumentModuleSettings.create()); public static InboundConnectorContextBuilder create() { return new InboundConnectorContextBuilder(); diff --git a/connector-sdk/test/src/main/java/io/camunda/connector/test/outbound/OutboundConnectorContextBuilder.java b/connector-sdk/test/src/main/java/io/camunda/connector/test/outbound/OutboundConnectorContextBuilder.java index 6f35510115..c739b6f0ce 100644 --- a/connector-sdk/test/src/main/java/io/camunda/connector/test/outbound/OutboundConnectorContextBuilder.java +++ b/connector-sdk/test/src/main/java/io/camunda/connector/test/outbound/OutboundConnectorContextBuilder.java @@ -46,12 +46,8 @@ public class OutboundConnectorContextBuilder { protected DocumentFactory documentFactory = new DocumentFactoryImpl(InMemoryDocumentStore.INSTANCE); private ObjectMapper objectMapper = - ConnectorsObjectMapperSupplier.getCopy() - .registerModule( - new JacksonModuleDocument( - this.documentFactory, - null, - JacksonModuleDocument.DocumentModuleSettings.create())); + ConnectorsObjectMapperSupplier.getCopy( + this.documentFactory, JacksonModuleDocument.DocumentModuleSettings.create()); /** * @return a new instance of the {@link OutboundConnectorContextBuilder} diff --git a/connectors-e2e-test/connectors-e2e-test-rabbitmq/src/test/java/io/camunda/connector/e2e/RabbitMqInboundStartEventTests.java b/connectors-e2e-test/connectors-e2e-test-rabbitmq/src/test/java/io/camunda/connector/e2e/RabbitMqInboundStartEventTests.java index 00cbaf2d38..5a60000a93 100644 --- a/connectors-e2e-test/connectors-e2e-test-rabbitmq/src/test/java/io/camunda/connector/e2e/RabbitMqInboundStartEventTests.java +++ b/connectors-e2e-test/connectors-e2e-test-rabbitmq/src/test/java/io/camunda/connector/e2e/RabbitMqInboundStartEventTests.java @@ -19,6 +19,7 @@ import static io.camunda.connector.e2e.BpmnFile.replace; import static org.mockito.Mockito.when; +import com.fasterxml.jackson.databind.ObjectMapper; import com.rabbitmq.client.Channel; import com.rabbitmq.client.Connection; import com.rabbitmq.client.ConnectionFactory; @@ -64,6 +65,7 @@ public class RabbitMqInboundStartEventTests extends BaseRabbitMqTest { private static String PORT; private static RabbitMQContainer rabbitMQContainer; private static ConnectionFactory factory; + private final ObjectMapper objectMapper = ConnectorsObjectMapperSupplier.getCopy(); @Autowired ProcessStateStore processStateStore; @@ -131,10 +133,9 @@ public void uriAuthenticationReceiveMessageTest() throws Exception { private void assertIntermediateCatchEventUsingModel(BpmnModelInstance model) throws Exception { Object expectedJsonResponse = - ConnectorsObjectMapperSupplier.getCopy() - .readValue( - "{\"message\":{\"consumerTag\":\"myConsumerTag\",\"body\":{\"foo\": {\"bar\": \"barValue\"}},\"properties\":{}}}", - Object.class); + this.objectMapper.readValue( + "{\"message\":{\"consumerTag\":\"myConsumerTag\",\"body\":{\"foo\": {\"bar\": \"barValue\"}},\"properties\":{}}}", + Object.class); processStateStore.update(mockProcessDefinition(model));