AdminController extends AbstractController { @RequestMapping("/patientlookup/query") @ResponseStatus(HttpStatus.OK) public @ResponseBody List<PatientAdminDto> getByFirstAndLastName( @RequestParam(value = "token", required = true) String token) { String[] tokens = token.split("\\s*(=>|,|\\s)\\s*"); return patientService.findAllPatientByFirstNameAndLastName(tokens); }  @RequestMapping(value = "adminHome.html") String adminHome(Model model, HttpServletRequest request,
			BasicPatientAccountDto basicPatientAccountDto); @RequestMapping(value = "adminPatientView.html") String adminPatientViewByPatientId(
			Model model,
			@RequestParam(value = "id", required = false, defaultValue = "-1") long patientId,
			@RequestParam(value = "username", required = false) String userName,
			@RequestParam(value = "notify", required = false) String notify,
			@RequestParam(value = "status", required = false) String status,
			@RequestParam(value = "duplicateconsent", required = false) String duplicateConsent); @RequestMapping(value = "adminPatientViewSubmitConsent.html", method = RequestMethod.POST) String adminPatientViewSubmitConsent(
			@RequestParam(value = "consentId") long consentId,
			@RequestParam(value = "patientId") long patientId); @RequestMapping(value = "adminPatientViewDeleteConsent", method = RequestMethod.POST) String adminPatientViewDeleteConsent(
			@RequestParam(value = "consentId") long consentId,
			@RequestParam(value = "patientId") long patientId); @RequestMapping(value = "adminEditPatientProfile.html", method = RequestMethod.POST) String adminEditPatientProfile(
			@Valid PatientProfileDto patientProfileDto,
			BindingResult bindingResult, Model model); @RequestMapping(value = "adminPatientViewCreateConsent.html") String adminPatientViewCreateConsent(
			@RequestParam(value = "id", defaultValue = "-1") long patientId,
			Model model); @RequestMapping(value = "adminPatientViewCreateConsent.html", method = RequestMethod.POST) @ResponseBody String adminPatientViewCreateConsent(
			@Valid ConsentDto consentDto,
			@RequestParam("patientId") long patientId,
			BindingResult bindingResult,
			Model model,
			@RequestParam(value = "ICD9", required = false) HashSet<String> icd9,
			@RequestParam(value = "isAddConsent") boolean isAddConsent); @RequestMapping(value = "adminPatientViewRevokeConsent.html", method = RequestMethod.POST) String signConsentRevokation(
			@RequestParam("consentId") long consentId,
			@RequestParam("revokationType") String revokationType,
			@RequestParam("patientId") long patientId); @RequestMapping(value = "adminPatientViewEditConsent.html") String adminPatientViewEditConsent(
			@RequestParam(value = "consentId", defaultValue = "-1") long consentId,
			@RequestParam("patientId") long patientId, Model model); @RequestMapping(value = "editAdminProfile.html") String editAdminProfile(Model model); @RequestMapping(value = "editAdminProfile.html", method = RequestMethod.POST) String profile(@Valid AdminProfileDto adminProfileDto,
			BindingResult bindingResult, Model model); @RequestMapping(value = "/downloadPdf.html", method = RequestMethod.GET) String downloadConsentPdfFile(HttpServletRequest request,
			HttpServletResponse response,
			@RequestParam("consentId") long consentId); @RequestMapping(value = "adminCreatePatientAccount.html", method = RequestMethod.POST) String adminCreatePatientAccount(
			@Valid BasicPatientAccountDto basicPatientAccountDto,
			BindingResult result, RedirectAttributes redirectAttributes,
			Model model); @RequestMapping(value = "sendLoginInformation.html", method = RequestMethod.GET) @ResponseBody String adminSendLoginInfoEmail(
			@RequestParam("patientId") long patientId,
			HttpServletRequest request); @RequestMapping("/patientlookup/query") @ResponseStatus(HttpStatus.OK) @ResponseBody List<PatientAdminDto> getByFirstAndLastName(
			@RequestParam(value = "token", required = true) String token); @RequestMapping(value = "connectionProviderAdd.html", method = RequestMethod.POST) @ResponseBody String addProvider(
			@RequestParam("npi") String npi,
			@RequestParam(value = "patientusername", defaultValue = "") String patientUserName,
			@RequestParam("patientId") String patientId); @RequestMapping(value = "/deleteIndividualProvider", method = RequestMethod.POST) @ResponseBody String deleteIndividualProvider(
			@RequestParam("individualProviderid") long individualProviderid,
			@RequestParam("patientId") String patientId, Model model); @RequestMapping(value = "/deleteOrganizationalProvider", method = RequestMethod.POST) @ResponseBody String deleteOrganizationalProvider(
			@RequestParam("organizationalProviderid") long organizationalProviderid,
			@RequestParam("patientId") String patientId, Model model); @RequestMapping(value = "/addStaffFavoriteIndividualProvider", method = RequestMethod.POST) @ResponseBody String addStaffFavoriteIndividualProvider(
			@RequestParam("providerid") long providerId); @RequestMapping(value = "/isStaffFavoriteIndividualProvider", method = RequestMethod.GET) @ResponseBody String isStaffFavoriteIndividualProvider(
			@RequestParam("providerid") long providerId); @RequestMapping(value = "/isStaffFavoriteOrganizationalProvider", method = RequestMethod.GET) @ResponseBody String isStaffFavoriteOrganizationalProvider(
			@RequestParam("providerid") long providerId); @RequestMapping(value = "/addStaffFavoriteOrganizationalProvider", method = RequestMethod.POST) @ResponseBody String addStaffFavoriteOrganizationalProvider(
			@RequestParam("providerid") long providerId); @RequestMapping(value = "providerSearch.html", method = RequestMethod.GET) String ajaxProviderSearch(HttpServletRequest request,
			HttpServletResponse response); HashMap<String, String> deserializeResult(String providerDtoJSON); static final int NPI_LENGTH; }
@Test public void testGetByFirstAndLastName() throws Exception { List<PatientAdminDto> PatientAdminDtos = new ArrayList<PatientAdminDto>(); PatientAdminDto patientAdminDto = new PatientAdminDto(); patientAdminDto.setFirstName("Mary"); patientAdminDto.setLastName("Doe"); patientAdminDto.setId((long) 1); PatientAdminDtos.add(patientAdminDto); when( patientService .findAllPatientByFirstNameAndLastName(any(String[].class))) .thenReturn(PatientAdminDtos); mockMvc.perform( get("/Administrator .andExpect(status().isOk()) .andExpect( content().contentType("application/json;charset=UTF-8")) .andExpect( content() .string("[{\"firstName\":\"Mary\",\"lastName\":\"Doe\",\"id\":1,\"birthDay\":null,\"socialSecurityNumber\":null}]")); }