esecules commented on code in PR #10079:
URL: https://github.com/apache/nifi/pull/10079#discussion_r2198270163


##########
nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/java/org/apache/nifi/web/StandardNiFiServiceFacadeTest.java:
##########
@@ -1076,13 +1076,90 @@ public void testGetRuleViolationsForGroupIsRecursive() 
throws Exception {
                 grandChildRuleViolation1, grandChildRuleViolation2, 
grandChildRuleViolation3
         ));
 
+        when(processGroupDAO.getProcessGroup("root")).thenReturn(processGroup);
+        reset(ruleViolationsManager);
+        when(ruleViolationsManager.isEmpty()).thenReturn(false);
+        
when(ruleViolationsManager.getAllRuleViolations()).thenReturn(expected);
+
+        // WHEN
+        Collection<RuleViolation> actual = 
serviceFacade.getRuleViolationStream(processGroup.getIdentifier()).collect(Collectors.toSet());

Review Comment:
   I'd need both for full branch coverage of the `else if()` block in 
`getRuleViolationStream`



-- 
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]

Reply via email to