code:     public void testDoEnable() throws Exception{
          FreeStyleProject project = j.createFreeStyleProject("project");
          GlobalMatrixAuthorizationStrategy auth = new GlobalMatrixAuthorizationStrategy();   
          j.jenkins.setAuthorizationStrategy(auth);
          j.jenkins.setCrumbIssuer(null);
          HudsonPrivateSecurityRealm realm = new HudsonPrivateSecurityRealm(false);
          j.jenkins.setSecurityRealm(realm);
          User user = realm.createAccount("John Smith", "password");
          SecurityContextHolder.getContext().setAuthentication(user.impersonate()); 
          project.disable();
          try{
              project.doEnable();
              fail("User should not have permission to build project");
          }
          catch(Exception e){
              if(!(e.getClass().isAssignableFrom(AccessDeniedException2.class))){
                 fail("AccessDeniedException should be thrown.");
              }
          } 
          auth.add(Job.READ, user.getId());
          auth.add(Job.CONFIGURE, user.getId());
          auth.add(Jenkins.READ, user.getId());
          List<HtmlForm> forms = j.createWebClient().login(user.getId(), "password").goTo(project.getUrl()).getForms();
          for(HtmlForm form:forms){
              if("enable".equals(form.getAttribute("action"))){
                  j.submit(form);
              }
          }
         assertFalse("Project should be enabled.", project.isDisabled());
      }
      
      /**
       * Job is un-restricted (no nabel), this is submitted to queue, which spawns an on demand slave
       * @throws Exception 
       */
      @Test
  