@@ -128,7 +128,7 @@ public void verifyStringMessages() throws JMSException {
128128 }
129129
130130 @ Test
131- public void verifyMqConfig () throws JMSException {
131+ public void verifyCipherMappingsConfig () throws JMSException {
132132 final MQSinkTask newConnectTask = new MQSinkTask ();
133133
134134 // configure a sink task for string messages
@@ -142,27 +142,12 @@ public void verifyMqConfig() throws JMSException {
142142 // start the task so that it connects to MQ
143143 newConnectTask .start (connectorConfigProps );
144144
145- // create some test messages
146- final List <SinkRecord > records = new ArrayList <>();
147- records .add (generateSinkRecord (null , "hello" ));
148- records .add (generateSinkRecord (null , "world" ));
149- newConnectTask .put (records );
150-
151- // flush the messages
152- final Map <TopicPartition , OffsetAndMetadata > offsets = new HashMap <>();
153- final TopicPartition topic = new TopicPartition (TOPIC , PARTITION );
154- final OffsetAndMetadata offset = new OffsetAndMetadata (commonOffset );
155- offsets .put (topic , offset );
156- newConnectTask .flush (offsets );
145+ // Check if the config reflects the change
146+ String cipherMappingProp = System .getProperty ("com.ibm.mq.cfg.useIBMCipherMappings" );
147+ assertEquals ("true" , cipherMappingProp );
157148
158149 // stop the task
159150 newConnectTask .stop ();
160-
161- // verify that the messages were successfully submitted to MQ
162- final List <Message > messagesInMQ = getAllMessagesFromQueue (DEFAULT_SINK_QUEUE_NAME );
163- assertEquals (2 , messagesInMQ .size ());
164- assertEquals ("hello" , messagesInMQ .get (0 ).getBody (String .class ));
165- assertEquals ("world" , messagesInMQ .get (1 ).getBody (String .class ));
166151 }
167152
168153 @ Test
0 commit comments