elharo commented on code in PR #1597:
URL: 
https://github.com/apache/maven-dependency-plugin/pull/1597#discussion_r3006100439


##########
src/test/java/org/apache/maven/plugins/dependency/exclusion/AnalyzeExclusionsMojoTest.java:
##########
@@ -85,9 +83,7 @@ void setUp() {
         when(project.getArtifactId()).thenReturn("testArtifactId");
         when(project.getVersion()).thenReturn("1.0.0");
 
-        DependencyManagement dependencyManagement = 
mock(DependencyManagement.class);
-        
when(dependencyManagement.getDependencies()).thenReturn(Collections.emptyList());
-        
when(project.getDependencyManagement()).thenReturn(dependencyManagement);
+        when(project.getDependencyManagement()).thenReturn(null);

Review Comment:
   I think the existing tests should still work without changes. You need to 
add a new test that specifically addresses the null case. 



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