ScmFileSet fileSet = new ScmFileSet( rootProject.getFile().getParentFile(), rootProject.getFile() );
scmProviderMock = mock( ScmProvider.class );
when( scmProviderMock.checkIn( isA( ScmRepository.class ),
argThat( new IsScmFileSetEquals( fileSet ) ),
isNull( ScmVersion.class ),
eq( message ) ) ).thenReturn( new CheckInScmResult( "...", Collections.singletonList( new ScmFile( rootProject
.getFile().getPath(), ScmFileStatus.CHECKED_IN ) ) ) );
ScmManagerStub stub = (ScmManagerStub) lookup( ScmManager.ROLE );
stub.setScmProvider( scmProviderMock );
}