OrientPyPiRestoreBlobStrategy extends BaseRestoreBlobStrategy<PyPiRestoreBlobData> { @Override public void after(final boolean updateAssets, final Repository repository) { if (updateAssets) { pyPiRepairIndexComponent.repairRepository(repository); } else { log.info("Updating assets disabled so not running repair of PyPi package metadata"); } } @Inject  OrientPyPiRestoreBlobStrategy(final NodeAccess nodeAccess,
                                       final RepositoryManager repositoryManager,
                                       final BlobStoreManager blobStoreManager,
                                       final DryRunPrefix dryRunPrefix,
                                       final OrientPyPiRepairIndexComponent pyPiRepairIndexComponent,
                                       final PyPiRestoreBlobDataFactory pyPiRestoreBlobDataFactory); @Override void after(final boolean updateAssets, final Repository repository);  }
@Test public void testRestoreRepairIfAssetsUpdated() { underTest.after(true, repository); verify(pyPiRepairIndexComponent).repairRepository(repository); verifyNoMoreInteractions(pyPiRepairIndexComponent); }
@Test public void testRestoreDoesNotRepairIfAssetsNotUpdated() { underTest.after(false, repository); verifyZeroInteractions(pyPiRepairIndexComponent); }