### Question:
ProductService { @RequestMapping("/products") List<Product> getProductsForCategory(@RequestParam("id") int id) { return prodRepo.findByCatId(id); }    }### Answer:
@Test public void getProductsForCategory() { ResponseEntity<Object[]> response = restTemplate.getForEntity("/products?id=1", Object[].class); assertEquals(HttpStatus.OK, response.getStatusCode()); assertFalse(response.getBody().length == 0); }