ReviewController { @RequestMapping(value = "/createReview", method = RequestMethod.POST) public Review createReview(@Validated(Create.class) @RequestBody Review review) { review.setDateAdded(new java.sql.Date(new Date().getTime())); return reviewService.addReview(review); } @Autowired  ReviewController(ReviewService reviewService);  ReviewController(); void setReviewService(ReviewService service); @RequestMapping(value = "/createReview", method = RequestMethod.POST) Review createReview(@Validated(Create.class) @RequestBody Review review); @RequestMapping(value = "/getReview", method = RequestMethod.POST) List<Review> GetReviews(@Validated(Create.class) @RequestBody Review review);  }
@Test public void testCreateReview() { assertEquals(review, controller.createReview(review)); }
@Test public void testInvalidCreateReviews() { assertEquals(null, controller.createReview(review2)); }