@Test @Rollback(false) public void testCreateGiftPdf() throws Exception { mockMvc.perform(get(Uris.GIFT_PDF).contentType(TestUtil.APPLICATION_JSON_UTF8).param("giftId", "1").accept("application/pdf")).andExpect(status().isOk()); }
@RequestMapping(value = Uris.GIFT_PDF, method = RequestMethod.GET, headers = "Accept=application/pdf") public ResponseEntity<?> createGiftPdf(HttpServletResponse response, @RequestParam long giftId) throws IpatException { _giftService.createGiftPdf(giftId, response); return new ResponseEntity<>(HttpStatus.OK); }
GiftController { @RequestMapping(value = Uris.GIFT_PDF, method = RequestMethod.GET, headers = "Accept=application/pdf") public ResponseEntity<?> createGiftPdf(HttpServletResponse response, @RequestParam long giftId) throws IpatException { _giftService.createGiftPdf(giftId, response); return new ResponseEntity<>(HttpStatus.OK); } }
GiftController { @RequestMapping(value = Uris.GIFT_PDF, method = RequestMethod.GET, headers = "Accept=application/pdf") public ResponseEntity<?> createGiftPdf(HttpServletResponse response, @RequestParam long giftId) throws IpatException { _giftService.createGiftPdf(giftId, response); return new ResponseEntity<>(HttpStatus.OK); }  }
GiftController { @RequestMapping(value = Uris.GIFT_PDF, method = RequestMethod.GET, headers = "Accept=application/pdf") public ResponseEntity<?> createGiftPdf(HttpServletResponse response, @RequestParam long giftId) throws IpatException { _giftService.createGiftPdf(giftId, response); return new ResponseEntity<>(HttpStatus.OK); }  @RequestMapping(value = Uris.GIFTS_BY_CONSIGNOR, method = RequestMethod.GET) @JsonView(Views.OverviewGift.class) ResponseEntity<?> findGiftsByConsignor(@RequestHeader(value = "X-AUTH-TOKEN") String userToken, @RequestParam String userName); @RequestMapping(value = Uris.GIFTS_BY_RECIPIENT, method = RequestMethod.GET) @JsonView(Views.OverviewGift.class) ResponseEntity<?> findGiftsByRecipient(@RequestHeader(value = "X-AUTH-TOKEN") String userToken, @RequestParam String userName); @RequestMapping(value = Uris.GIFT_CREATE, method = RequestMethod.POST) @Transactional ResponseEntity<?> generateGift(@RequestHeader(value = "X-AUTH-TOKEN") String userToken, @RequestBody PlantBag plantBag); @RequestMapping(value = Uris.GIFT_PDF, method = RequestMethod.GET, headers = "Accept=application/pdf") ResponseEntity<?> createGiftPdf(HttpServletResponse response, @RequestParam long giftId); }
GiftController { @RequestMapping(value = Uris.GIFT_PDF, method = RequestMethod.GET, headers = "Accept=application/pdf") public ResponseEntity<?> createGiftPdf(HttpServletResponse response, @RequestParam long giftId) throws IpatException { _giftService.createGiftPdf(giftId, response); return new ResponseEntity<>(HttpStatus.OK); }  @RequestMapping(value = Uris.GIFTS_BY_CONSIGNOR, method = RequestMethod.GET) @JsonView(Views.OverviewGift.class) ResponseEntity<?> findGiftsByConsignor(@RequestHeader(value = "X-AUTH-TOKEN") String userToken, @RequestParam String userName); @RequestMapping(value = Uris.GIFTS_BY_RECIPIENT, method = RequestMethod.GET) @JsonView(Views.OverviewGift.class) ResponseEntity<?> findGiftsByRecipient(@RequestHeader(value = "X-AUTH-TOKEN") String userToken, @RequestParam String userName); @RequestMapping(value = Uris.GIFT_CREATE, method = RequestMethod.POST) @Transactional ResponseEntity<?> generateGift(@RequestHeader(value = "X-AUTH-TOKEN") String userToken, @RequestBody PlantBag plantBag); @RequestMapping(value = Uris.GIFT_PDF, method = RequestMethod.GET, headers = "Accept=application/pdf") ResponseEntity<?> createGiftPdf(HttpServletResponse response, @RequestParam long giftId);  }