P2RestoreBlobStrategy extends BaseRestoreBlobStrategy<P2RestoreBlobData> { @Override protected P2RestoreBlobData createRestoreData(final RestoreBlobData restoreBlobData) { checkState(!isEmpty(restoreBlobData.getBlobName()), "Blob name cannot be empty"); return new P2RestoreBlobData(restoreBlobData); } @Inject  P2RestoreBlobStrategy(final NodeAccess nodeAccess,
                               final RepositoryManager repositoryManager,
                               final BlobStoreManager blobStoreManager,
                               final DryRunPrefix dryRunPrefix);   }
@Test public void testBlobDataIsCreated() { assertThat(restoreBlobStrategy.createRestoreData(restoreBlobData).getBlobData(), is(restoreBlobData)); }
@Test(expected = IllegalStateException.class) public void testIfBlobDataNameIsEmptyExceptionIsThrown() { when(p2RestoreBlobData.getBlobData().getBlobName()).thenReturn(""); restoreBlobStrategy.createRestoreData(restoreBlobData); }