nandorsoma commented on code in PR #6649:
URL: https://github.com/apache/nifi/pull/6649#discussion_r1024349399
##########
nifi-nar-bundles/nifi-amqp-bundle/nifi-amqp-processors/src/test/java/org/apache/nifi/amqp/processors/PublishAMQPTest.java:
##########
@@ -134,14 +124,10 @@ public void
validateSuccessWithHeaderWithCommaPublishToSuccess() throws Exceptio
final Map<String, Object> headerMap = msg1.getProps().getHeaders();
- final Object foo = headerMap.get("foo");
- final Object foo2 = headerMap.get("foo2");
- final Object foo3 = headerMap.get("foo3");
-
- assertEquals("(bar,bar)", foo.toString());
- assertEquals("bar2", foo2.toString());
- assertNull(foo3);
-
+ assertEquals(2, headerMap.size());
+ assertEquals("(bar,bar)", headerMap.get("foo").toString());
Review Comment:
Good idea, thanks @thenatog! I added a minor modification, though. I'm
creating the maps locally because you cannot use the same map for both tests.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]