DomainBundleProjectResourcesContentProcessor implements ResourcesContentProcessor { @Override public void process(ResourcesContent resourcesContent) throws IOException { for (Artifact artifact : resourcesContent.getResources()) { copyAsDomainOrApplication(artifact); } } DomainBundleProjectResourcesContentProcessor(Path targetFolder); @Override void process(ResourcesContent resourcesContent);  }
@Test public void processTest() throws IOException { DomainBundleProjectResourcesContentProcessor contentProcessorSpy = spy(contentProcessor); doNothing().when(contentProcessorSpy).copyAsDomainOrApplication(any()); ResourcesContent resourcesMock = mock(ResourcesContent.class); List<Artifact> artifactMockList = new ArrayList<>(); artifactMockList.add(mock(Artifact.class)); artifactMockList.add(mock(Artifact.class)); artifactMockList.add(mock(Artifact.class)); when(resourcesMock.getResources()).thenReturn(artifactMockList); contentProcessorSpy.process(resourcesMock); verify(contentProcessorSpy, times(3)).copyAsDomainOrApplication(any()); }