title: @RequestMapping java.lang.AssertionError: Status Expected :200 Actual :404
body: <p>Assertion error using @RequestMapping annotation outside of the class </p>
  
  <p><strong>I am getting this error message:</strong> </p>
  
  <pre><code> java.lang.AssertionError: Status 
      Expected :200
      Actual   :404
  </code></pre>
  
  <p><strong>My Controller is like this</strong></p>
  
  <pre><code>        @Service
          @RestController
          @RequestMapping("/execute/files")
          @ResponseBody
          public class ControllerFiles {
              @Autowired
              @Qualifier("fileRunner")
              ProcessRunnerInterface processRunnerInterfaceFiles;  
  
              public InputState executeRestFile(@RequestParam String name) throws ExecutionFailedException, URISyntaxException {
                 ///code///    
              }
              public List&lt;String&gt;....{
               ///code///
              }
          }
  </code></pre>
  
  <p><strong>My Test</strong></p>
  
  <pre><code>  @RunWith(SpringJUnit4ClassRunner.class)
      @SpringBootTest
      @AutoConfigureMockMvc
      public class ControllerFilesTest {
  
          @Autowired
          private MockMvc mockMvc;
          @Autowired
          ControllerFiles controllerFiles;
  
          @Test
          public void testSpringMvcGetFiles() throws Exception {
  
              this.mockMvc.perform(get("/execute/files").param("name", "Spring Community Files"))
                      .andDo(print()).andExpect(status().isOk());
          }
  }
  </code></pre>
  
  <p><strong>But when I have my code like this the test work fine!</strong></p>
  
  <pre><code>            @Service
              @RestController
              public class ControllerFiles {
                  @Autowired
                  @Qualifier("fileRunner")
                  ProcessRunnerInterface processRunnerInterfaceFiles;
  
                  @RequestMapping("/execute/files")
                  @ResponseBody
                  public InputState executeRestFile(@RequestParam String name) throws ExecutionFailedException, URISyntaxException {
                    ///code///        
                  }  
                 public List&lt;String&gt;....{  
                    ///code/// 
                 }
  }
  </code></pre>
  
  <p><strong>Any ideas what is going wrong?</strong></p>