senegalo commented on a change in pull request #12056: URL: https://github.com/apache/flink/pull/12056#discussion_r499214594
########## File path: flink-connectors/flink-connector-rabbitmq/src/test/java/org/apache/flink/streaming/connectors/rabbitmq/RMQSourceTest.java ########## @@ -318,6 +320,36 @@ public void testConstructorParams() throws Exception { assertEquals("passTest", testObj.getFactory().getPassword()); } + /** + * Tests getting the correct body and correlationID given which constructor was called. + * if the constructor with the {@link DeserializationSchema} was called it should extract the body of the message + * from the {@link Delivery} and the correlation ID from the {@link AMQP.BasicProperties} which are + * mocked to "I Love Turtles" and "0". + * if the constructor with the {@link RMQDeserializationSchema} was called it uses the + * {@link RMQDeserializationSchema#deserialize} method to parse the message and extract the correlation ID which + * both are implemented in {@link RMQTestSource#initAMQPMocks()} to return the + * {@link AMQP.BasicProperties#getMessageId()} that is mocked to return "1-MESSAGE_ID" + */ + @Test + public void testProcessMessage() throws Exception { Review comment: Fixed all warnings but the unchecked generics. apparently that's a known issue: https://github.com/mockito/mockito/issues/1531 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org