datasourceMgmtService = new JcrBackedDatasourceMgmtService( repository, new DatabaseDialectService() );
datasourceMgmtWS = new DefaultDatasourceMgmtWebService( datasourceMgmtService );
adapter = new DatasourceMgmtToWebServiceAdapter( datasourceMgmtWS );
SecurityContextHolder.getContext()
.setAuthentication(
new UsernamePasswordAuthenticationToken( MockUnifiedRepository.root().getName(), null,
new GrantedAuthority[0] ) );
repository.createFolder( repository.getFile( "/etc" ).getId(), new RepositoryFile.Builder( FOLDER_PDI ).folder(
true ).build(), new RepositoryFileAcl.Builder( MockUnifiedRepository.root() ).ace(
MockUnifiedRepository.everyone(), READ, WRITE ).build(), null );
repository.createFolder( repository.getFile( "/etc/pdi" ).getId(), new RepositoryFile.Builder( FOLDER_DATABASES )
.folder( true ).build(), null );
SecurityContextHolder.getContext().setAuthentication(
new UsernamePasswordAuthenticationToken( EXP_LOGIN, null, new GrantedAuthority[0] ) );
KettleClientEnvironment.init();
}