@Test public void shouldFetchManifest() { ManifestCms manifestCms = getRootManifestCms(); when(certificateRepositoryObjectFetcher.getManifest( eq(ROOT_SIA_MANIFEST_RSYNC_LOCATION), eq(taContext), isA(ValidationResult.class))) .thenReturn(manifestCms); assertEquals(manifestCms, subject.fetchManifest(ROOT_SIA_MANIFEST_RSYNC_LOCATION, taContext)); }
@Test public void shouldNotProcessFilesWhenManifestIsNull() { when(certificateRepositoryObjectFetcher.getManifest( eq(ROOT_SIA_MANIFEST_RSYNC_LOCATION), eq(taContext), isA(ValidationResult.class))) .thenReturn(null); subject.processManifest(taContext); verify(certificateRepositoryObjectFetcher) .getManifest( eq(ROOT_SIA_MANIFEST_RSYNC_LOCATION), eq(taContext), isA(ValidationResult.class)); verifyNoMoreInteractions(certificateRepositoryObjectFetcher); }