Code example for MockMvc

Methods: perform

0
    performValidCreateProjectRequest(); 
    verify(analyzerScheduler).scheduleAnalyzer(any(Project.class));
  } 
 
  private void performValidCreateProjectRequest() throws Exception {
    mockMvc.perform(post("/projects/create")
        .param("name", "MyProject")
        .param("profile.id", "1")
        .param("cronExpression", "* * * * * *")
        .param("sonarConnectionSettings.url", "http://localhost")
        .param("sonarConnectionSettings.project", "project")
        .param("scmSettings.url", "scm:svnhttp://svn.localhost")
        .param("codeChangeSettings.method", "1")
        .param("codeChangeSettings.days", "30"))
        .andExpect(status().isMovedTemporarily());
  } 
 
  private void performInvalidCreateProjectRequest() throws Exception {
    mockMvc.perform(post("/projects/create")
        .param("name", "MyProject")