protected void checkTransaction(
     final Set<DefaultMavenDeployment> defaultMavenDeployments,
     AttachedArtifact attachedArtifact,
     PublishArtifact classifierArtifact)
     throws IOException, PlexusContainerException {
   final Set<File> protocolJars = WrapUtil.toLinkedSet(new File("jar1"), new File("jar1"));
   context.checking(
       new Expectations() {
         {
           allowing(configurationStub).resolve();
           will(returnValue(protocolJars));
           allowing(deployTaskFactoryMock).create();
           will(returnValue(getInstallDeployTask()));
           allowing(deployTaskMock).getContainer();
           will(returnValue(plexusContainerMock));
           for (File protocolProviderJar : protocolJars) {
             one(plexusContainerMock).addJarResource(protocolProviderJar);
           }
           one(deployTaskMock).setUniqueVersion(mavenDeployer.isUniqueVersion());
           one(deployTaskMock).addRemoteRepository(testRepository);
           one(deployTaskMock).addRemoteSnapshotRepository(testSnapshotRepository);
         }
       });
   super.checkTransaction(defaultMavenDeployments, attachedArtifact, classifierArtifact);
 }
 public void setUp() {
   super.setUp();
   mavenDeployer = createMavenDeployer();
   mavenDeployer.setDeployTaskFactory(deployTaskFactoryMock);
   mavenDeployer.setRepository(testRepository);
   mavenDeployer.setSnapshotRepository(testSnapshotRepository);
   mavenDeployer.setConfiguration(configurationStub);
   mavenDeployer.setUniqueVersion(false);
 }