P2RestoreBlobStrategy extends BaseRestoreBlobStrategy<P2RestoreBlobData> { @Override protected boolean componentRequired(final P2RestoreBlobData data) { P2RestoreFacet facet = getRestoreFacet(data); final String path = data.getBlobData().getBlobName(); return facet.componentRequired(path); } @Inject  P2RestoreBlobStrategy(final NodeAccess nodeAccess,
                               final RepositoryManager repositoryManager,
                               final BlobStoreManager blobStoreManager,
                               final DryRunPrefix dryRunPrefix);   }
@Test public void testComponentIsRequiredForGz() { boolean expected = true; when(p2RestoreFacet.componentRequired(PACKAGE_PATH)).thenReturn(expected); assertThat(restoreBlobStrategy.componentRequired(p2RestoreBlobData), is(expected)); verify(p2RestoreFacet).componentRequired(PACKAGE_PATH); verifyNoMoreInteractions(p2RestoreFacet); }