ScmProvider scmProviderMock = mock( ScmProvider.class );
when( scmProviderMock.checkOut( isA( ScmRepository.class ),
argThat( new IsScmFileSetEquals( new ScmFileSet( checkoutDirectory ) ) ),
isA( ScmTag.class ) ) ).thenReturn( new CheckOutScmResult( "...", Collections.<ScmFile>emptyList() ) );
ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
stub.setScmProvider( scmProviderMock );
ReleaseDescriptorStoreStub configStore = new ReleaseDescriptorStoreStub();
configStore.getReleaseConfiguration().setCompletedPhase( "end-release" );
releaseManager.setConfigStore( configStore );