private Repository generateSimpleRepository() {
   if (simpleRepository == null) {
     simpleRepository = new Repository();
     simpleRepository.setId(TESTCASE_REPOSITORY_ID);
   }
   return simpleRepository;
 }
 private PermissionsData generateFullAccessPermissionsForRepository(
     Repository repository, ServerEnvironment environment) {
   PermissionsData permissionData = new PermissionsData();
   permissionData.setUser(generateUser());
   ArrayList<Permission> permissions = new ArrayList<Permission>();
   Permission permission = new Permission();
   permission.setRepositoryId(repository.getId());
   permission.setFullDeploymentAccess(true);
   permissions.add(permission);
   permissionData.setPermissions(permissions);
   return permissionData;
 }
 private PermissionsData generateWriteablePermissionsForRepository(
     Repository repository, ServerEnvironment environment) {
   PermissionsData permissionData = new PermissionsData();
   permissionData.setUser(generateUser());
   ArrayList<Permission> permissions = new ArrayList<Permission>();
   Permission permission = new Permission();
   permission.setRepositoryId(repository.getId());
   permission.setServerEnvironmentId(environment.getId());
   permissions.add(permission);
   permissionData.setPermissions(permissions);
   return permissionData;
 }