title: I need to create methods get () and status () to create a test controller with mockmvc?
body: <p>I am trying to test my first controller, followed a few examples on the internet, but is in error in methods <code>get()</code> and <code>status()</code> to compile.</p>
  <pre><code>import org.junit.Before;
  import org.junit.Test;
  import org.junit.runner.RunWith;
  import org.mockito.Mock;
  import org.mockito.MockitoAnnotations;
  import org.springframework.beans.factory.annotation.Autowired;
  import org.springframework.test.context.ContextConfiguration;
  import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  import org.springframework.test.context.web.WebAppConfiguration;
  import org.springframework.test.web.servlet.MockMvc;
  import org.springframework.test.web.servlet.RequestBuilder;
  import org.springframework.test.web.servlet.setup.MockMvcBuilders;
  
  import br.com.boot.application.Application;
  import br.com.boot.controller.ClienteController;
  
  @RunWith(SpringJUnit4ClassRunner.class)
  @ContextConfiguration(classes = Application.class)
  @WebAppConfiguration
  public class ClienteControllerTest {
      
      @Autowired
      private ClienteController controller;
      
      @Mock
      private MockMvc mock;
  
      @Before
      public void setUp() {
          MockitoAnnotations.initMocks(this);
          this.mock = MockMvcBuilders.standaloneSetup(controller).build();
      }
  
      @Test
      public void testandoClienteController() throws Exception{
          this.mock.perform(get(&quot;/novo&quot;).andExpect(status().isOk()));
      }
  }
  </code></pre>
  <p>My Class Controller</p>
  <pre><code>@RestController
  @RequestMapping(&quot;/cliente&quot;)
  public class ClienteController {
  
      @Autowired
      private ClienteAplicacaoService service;
  
      
      @RequestMapping(value = &quot;/novo&quot;, method = RequestMethod.GET)
      @ResponseBody 
      public ClienteData novo(@RequestBody NovoClienteComando comando){
          String clienteId = service.novoCliente(comando);
          return service.obterCliente(clienteId);
      }
      
      @RequestMapping(&quot;/obter&quot;)
      @ResponseBody 
      public ClienteData obter(@RequestParam(&quot;clienteId&quot;) String clienteId){
          return service.obterCliente(clienteId);
      }
      
  }
  
  Error:
  </code></pre>
  <p>Multiple markers at this line
  - The method get(String) is undefined for the type
  ClienteControllerTest
  - The method status() is undefined for the type
  ClienteControllerTest</p>