AgenteController { @RequestMapping( value= {"/api/agente/login/{numeroPlaca}/{pass}"}, method = RequestMethod.GET) public ResponseEntity<Agente> login( @PathVariable String numeroPlaca, @PathVariable String pass ){ ResponseEntity<Agente> response = new ResponseEntity<Agente>(HttpStatus.FORBIDDEN); try { Agente agente = agenteService.existe(numeroPlaca, pass); if ( agente !=null ) { response = new ResponseEntity<Agente>(agente, HttpStatus.OK); } }catch (Exception e) { LOG.error(e); response = new ResponseEntity<Agente>(HttpStatus.INTERNAL_SERVER_ERROR); } return response; } AgenteController(); @RequestMapping( value= {"/api/agente/login/{numeroPlaca}/{pass}"}, method = RequestMethod.GET) ResponseEntity<Agente> login( 
										@PathVariable String numeroPlaca, 
										@PathVariable String pass );  }
@Test public void login() { AgenteController aController = new AgenteController(); ResponseEntity<Agente> response = aController.login("admin", "admin"); assertEquals(200, response.getStatusCode().value()); assertNotNull("El Agente tiene que venir en el body",response.getBody()); response = aController.login("", ""); assertEquals(403, response.getStatusCode().value()); assertNull(response.getBody()); response = aController.login(null, null); assertEquals(403, response.getStatusCode().value()); assertNull(response.getBody()); }