Lehel44 commented on code in PR #6046:
URL: https://github.com/apache/nifi/pull/6046#discussion_r879697152
##########
nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/src/test/java/org/apache/nifi/snmp/configuration/V1TrapConfigurationTest.java:
##########
@@ -49,29 +44,32 @@ public void testMembersAreSetCorrectly() {
}
@Test
- public void testRequireNonNullEnterpriseOid() {
- exceptionRule.expect(IllegalArgumentException.class);
- exceptionRule.expectMessage("Enterprise OID must be specified.");
- V1TrapConfiguration.builder()
- .agentAddress(AGENT_ADDRESS)
- .genericTrapType(String.valueOf(GENERIC_TRAP_TYPE))
- .specificTrapType(String.valueOf(SPECIFIC_TRAP_TYPE))
- .build();
+ void testRequireNonNullEnterpriseOid() {
+ final IllegalArgumentException exception =
assertThrows(IllegalArgumentException.class, () ->
+ V1TrapConfiguration.builder()
+ .agentAddress(AGENT_ADDRESS)
+ .genericTrapType(String.valueOf(GENERIC_TRAP_TYPE))
+ .specificTrapType(String.valueOf(SPECIFIC_TRAP_TYPE))
+ .build()
+ );
+ assertEquals("Enterprise OID must be specified.",
exception.getMessage());
Review Comment:
This specific message is used only once, and except one duplication all the
other messages are different.
--
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]