### Question:
PatientController { @GetMapping public List<Patient> list(@RequestHeader(Constants.GRANT_HEADER) PureGrant grant) { return this.patientService.findAll(grant); }  @GetMapping List<Patient> list(@RequestHeader(Constants.GRANT_HEADER) PureGrant grant); @GetMapping("/{id}") Patient get(@RequestHeader(Constants.GRANT_HEADER) PureGrant grant, @PathVariable("id") String patientId); @GetMapping("/{id}/physicians") List<Physician> list(@RequestHeader(Constants.GRANT_HEADER) PureGrant grant,
			@PathVariable("id") String patientId);  }### Answer:
@Test void list() throws Exception { for (UserRegistration registeredPatient : this.registeredPatients) { HttpHeaders headers = new HttpHeaders(); headers.set(Constants.GRANT_HEADER, registeredPatient.getGrant()); HttpEntity<?> entity = new HttpEntity<>(headers); ResponseEntity<Patient[]> response = this.restTemplate.exchange("/patients", HttpMethod.GET, entity, Patient[].class); assertEquals(200, response.getStatusCodeValue()); Patient[] patients = response.getBody(); assertNotNull(patients); assertEquals(2, patients.length); for (Patient patient : patients) { if (registeredPatient.getUserId().equals(patient.getId())) { validate(patient); } else { assertNull(patient.getSsn()); } } this.mockMvc .perform(MockMvcRequestBuilders.request(HttpMethod.GET, "/patients/").header(Constants.GRANT_HEADER, registeredPatient.getGrant())) .andDo(document("patient/list", preprocessRequest(prettyPrint()), preprocessResponse(prettyPrint()))); } }