Tibor17 commented on a change in pull request #275: [MNG-6729] StringSearchModelInterpolator introspects objects from Java API URL: https://github.com/apache/maven/pull/275#discussion_r311756759
########## File path: maven-model-builder/pom.xml ########## @@ -84,6 +84,11 @@ under the License. <artifactId>xmlunit-matchers</artifactId> <scope>test</scope> </dependency> + <dependency> Review comment: We started with mocking MOJO and we improved the JaCoCo coverage of the class which normally can be tested only in the integration tests. So we used PowerMock and the coverage grew; wrong contributions can be easily found within a minute. So this was, I think, extremly good experience. And what is fantastic on such unit tests is the `showcase of purpose of the entire class` because good unit tests becomes documentation. So but complex MOJOs with private methods and injection would not be testable without mocking in unit 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services