new ItemSubscriber(feedRecorder);
when(storageFileItem.getPath()).thenReturn("/some/path");
when(storageFileItem.getRepositoryId()).thenReturn("central");
when(storageFileItem.getRemoteUrl()).thenReturn("http://repo1.maven.org/maven2");
{
final RepositoryItemEventStoreCreate evt = new RepositoryItemEventStoreCreate(repository, storageFileItem);
when(repositoryItemUid.getBooleanAttributeValue(IsMavenRepositoryMetadataAttribute.class)).thenReturn(
true);
underTest.on(evt);
}
{
final RepositoryItemEventStoreCreate evt = new RepositoryItemEventStoreCreate(repository, storageFileItem);
when(repositoryItemUid.getBooleanAttributeValue(IsMavenArtifactSignatureAttribute.class)).thenReturn(
true);
underTest.on(evt);
}
{
final RepositoryItemEventStoreCreate evt = new RepositoryItemEventStoreCreate(repository, storageFileItem);
when(repositoryItemUid.getBooleanAttributeValue(IsMavenChecksumAttribute.class)).thenReturn(true);
underTest.on(evt);
}
// these events above should be filtered out by ItemChangesFeedEventInspector, feedRecordes shall be untouched
verifyNoMoreInteractions(feedRecorder);
// now do touch it (with event that has all the flags we added false)
final RepositoryItemEventStoreCreate evt = new RepositoryItemEventStoreCreate(repository, storageFileItem);
when(repositoryItemUid.getBooleanAttributeValue(IsMavenRepositoryMetadataAttribute.class)).thenReturn(
false);
when(repositoryItemUid.getBooleanAttributeValue(IsMavenArtifactSignatureAttribute.class)).thenReturn(false);
when(repositoryItemUid.getBooleanAttributeValue(IsMavenChecksumAttribute.class)).thenReturn(false);
underTest.on(evt);