}
public void testCreateRepositoryAfterFailRestoreOnSystemWS() throws Exception
{
// create repository
RepositoryService service = (RepositoryService)container.getComponentInstanceOfType(RepositoryService.class);
String dsName = helper.createDatasource();
RepositoryEntry repoEntry = helper.createRepositoryEntry(false, null, dsName);
service.createRepository(repoEntry);
ManageableRepository repository = service.getRepository(repoEntry.getName());
WorkspaceEntry wsEntry = helper.createWorkspaceEntry(false, dsName);
helper.addWorkspace(repository, wsEntry);
service.getConfig().retain();
addConent(repository, repository.getConfiguration().getSystemWorkspaceName());
// backup
File backDir = new File("target/backup/" + IdGenerator.generate());