I have a serveresource method which serves an ajax call. I am trying to write a unit test for this serverresource method using MockResourceRequest and MockResourceResponse. I would really need some help on this if someone has an example to this. Thanks in advance..
Please see the below controller to handle the ajax call which is a serve resource method in JSR 286
[EDIT]
@Controller
@RequestMapping("VIEW")
public class Controller {
@ResourceMapping(value = "")
public String addMethod(ResourceRequest request, ResourceResponse response){
/* My logic to send the request attributes to Web Service and then push
the results to the JSP page*/
}
}