@Test public void testFindByLastNameAndStartsToday() throws Exception { mockMvc.perform( get("/appointments/search/findByLastNameAndStartsToday").param("lastName", "doe").accept(HAL_JSON)) .andDo(new VerifyFindResult(String.valueOf(appt.getId()))); }
@RequestMapping("/findByLastNameAndStartsToday") public HttpEntity<PagedResources<Resource<Appointment>>> findByLastNameAndStartsToday( PersistentEntityResourceAssembler entityAssembler, Pageable pageable, @RequestParam("lastName") String lastName) { OffsetDateTime beginningOfDay = OffsetDateTime.now().with(BEGINNING_OF_DAY_ADJUSTER); return findByLastNameAndStartsOnOrAfterDateTime(entityAssembler, pageable, lastName, beginningOfDay); }
AppointmentController { @RequestMapping("/findByLastNameAndStartsToday") public HttpEntity<PagedResources<Resource<Appointment>>> findByLastNameAndStartsToday( PersistentEntityResourceAssembler entityAssembler, Pageable pageable, @RequestParam("lastName") String lastName) { OffsetDateTime beginningOfDay = OffsetDateTime.now().with(BEGINNING_OF_DAY_ADJUSTER); return findByLastNameAndStartsOnOrAfterDateTime(entityAssembler, pageable, lastName, beginningOfDay); } }
AppointmentController { @RequestMapping("/findByLastNameAndStartsToday") public HttpEntity<PagedResources<Resource<Appointment>>> findByLastNameAndStartsToday( PersistentEntityResourceAssembler entityAssembler, Pageable pageable, @RequestParam("lastName") String lastName) { OffsetDateTime beginningOfDay = OffsetDateTime.now().with(BEGINNING_OF_DAY_ADJUSTER); return findByLastNameAndStartsOnOrAfterDateTime(entityAssembler, pageable, lastName, beginningOfDay); }  }
AppointmentController { @RequestMapping("/findByLastNameAndStartsToday") public HttpEntity<PagedResources<Resource<Appointment>>> findByLastNameAndStartsToday( PersistentEntityResourceAssembler entityAssembler, Pageable pageable, @RequestParam("lastName") String lastName) { OffsetDateTime beginningOfDay = OffsetDateTime.now().with(BEGINNING_OF_DAY_ADJUSTER); return findByLastNameAndStartsOnOrAfterDateTime(entityAssembler, pageable, lastName, beginningOfDay); }  @RequestMapping("/findAllToday") HttpEntity<PagedResources<Resource<Appointment>>> findAllToday(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable); @RequestMapping("/findByFirstName") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstName(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName); @RequestMapping("/findByLastName") HttpEntity<PagedResources<Resource<Appointment>>> findByLastName(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("lastName") String lastName); @RequestMapping("/findByFirstAndLastNames") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstAndLastNames(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName, @RequestParam("lastName") String lastName); @RequestMapping("/findByFirstNameAndStartsToday") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstNameAndStartsToday(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName); @RequestMapping("/findByLastNameAndStartsToday") HttpEntity<PagedResources<Resource<Appointment>>> findByLastNameAndStartsToday(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("lastName") String lastName); @RequestMapping("/findByFirstAndLastNamesAndStartsToday") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstAndLastNamesAndStartsToday(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName, @RequestParam("lastName") String lastName); @RequestMapping("/findByFirstNameAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstNameAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName, @RequestParam("startDateTime") OffsetDateTime startDateTime); @RequestMapping("/findByLastNameAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByLastNameAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("lastName") String lastName, @RequestParam("startDateTime") OffsetDateTime startDateTime); @RequestMapping("/findByFirstAndLastNamesAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstAndLastNamesAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName, @RequestParam("lastName") String lastName,
			@RequestParam("startDateTime") OffsetDateTime startDateTime); @RequestMapping("/findByEmail") HttpEntity<PagedResources<Resource<Appointment>>> findByEmail(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable, @RequestParam("email") String email); @RequestMapping("/findByEmailAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByEmailAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable, @RequestParam("email") String email,
			@RequestParam("startDateTime") OffsetDateTime startDateTime); @RequestMapping("/findByPhoneNum") HttpEntity<PagedResources<Resource<Appointment>>> findByPhoneNum(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("phoneNum") String phoneNum); @RequestMapping("/findByPhoneNumAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByPhoneNumAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("phoneNum") String phoneNum, @RequestParam("startDateTime") OffsetDateTime startDateTime); @RequestMapping("/findByPhoneNumEndingWith") HttpEntity<PagedResources<Resource<Appointment>>> findByPhoneNumEndingWith(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("phoneNum") String phoneNum); @RequestMapping("/findByPhoneNumEndingWithAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByPhoneNumEndingWithAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("phoneNum") String phoneNum, @RequestParam("startDateTime") OffsetDateTime startDateTime); }
AppointmentController { @RequestMapping("/findByLastNameAndStartsToday") public HttpEntity<PagedResources<Resource<Appointment>>> findByLastNameAndStartsToday( PersistentEntityResourceAssembler entityAssembler, Pageable pageable, @RequestParam("lastName") String lastName) { OffsetDateTime beginningOfDay = OffsetDateTime.now().with(BEGINNING_OF_DAY_ADJUSTER); return findByLastNameAndStartsOnOrAfterDateTime(entityAssembler, pageable, lastName, beginningOfDay); }  @RequestMapping("/findAllToday") HttpEntity<PagedResources<Resource<Appointment>>> findAllToday(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable); @RequestMapping("/findByFirstName") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstName(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName); @RequestMapping("/findByLastName") HttpEntity<PagedResources<Resource<Appointment>>> findByLastName(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("lastName") String lastName); @RequestMapping("/findByFirstAndLastNames") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstAndLastNames(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName, @RequestParam("lastName") String lastName); @RequestMapping("/findByFirstNameAndStartsToday") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstNameAndStartsToday(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName); @RequestMapping("/findByLastNameAndStartsToday") HttpEntity<PagedResources<Resource<Appointment>>> findByLastNameAndStartsToday(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("lastName") String lastName); @RequestMapping("/findByFirstAndLastNamesAndStartsToday") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstAndLastNamesAndStartsToday(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName, @RequestParam("lastName") String lastName); @RequestMapping("/findByFirstNameAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstNameAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName, @RequestParam("startDateTime") OffsetDateTime startDateTime); @RequestMapping("/findByLastNameAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByLastNameAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("lastName") String lastName, @RequestParam("startDateTime") OffsetDateTime startDateTime); @RequestMapping("/findByFirstAndLastNamesAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByFirstAndLastNamesAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("firstName") String firstName, @RequestParam("lastName") String lastName,
			@RequestParam("startDateTime") OffsetDateTime startDateTime); @RequestMapping("/findByEmail") HttpEntity<PagedResources<Resource<Appointment>>> findByEmail(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable, @RequestParam("email") String email); @RequestMapping("/findByEmailAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByEmailAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable, @RequestParam("email") String email,
			@RequestParam("startDateTime") OffsetDateTime startDateTime); @RequestMapping("/findByPhoneNum") HttpEntity<PagedResources<Resource<Appointment>>> findByPhoneNum(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("phoneNum") String phoneNum); @RequestMapping("/findByPhoneNumAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByPhoneNumAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("phoneNum") String phoneNum, @RequestParam("startDateTime") OffsetDateTime startDateTime); @RequestMapping("/findByPhoneNumEndingWith") HttpEntity<PagedResources<Resource<Appointment>>> findByPhoneNumEndingWith(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("phoneNum") String phoneNum); @RequestMapping("/findByPhoneNumEndingWithAndStartsOnOrAfterDateTime") HttpEntity<PagedResources<Resource<Appointment>>> findByPhoneNumEndingWithAndStartsOnOrAfterDateTime(
			PersistentEntityResourceAssembler entityAssembler, Pageable pageable,
			@RequestParam("phoneNum") String phoneNum, @RequestParam("startDateTime") OffsetDateTime startDateTime);  }