verify(calculator, only()).calculateArtifactUsage(item);
}
public void testRemoteEventWithPomFile() throws Exception {
ArtifactUsageEventInspector eventInspector = new ArtifactUsageEventInspector();
ArtifactUsageCalculator calculator = mock(ArtifactUsageCalculator.class);
eventInspector.setArtifactUsageCalculator(calculator);
StorageFileItem item = mock(StorageFileItem.class);
when(item.getPath()).thenReturn("some.pom");
RepositoryItemEvent event = mock(RepositoryItemEventDelete.class);
when(event.getItem()).thenReturn(item);