How do I pass the HttpServletRequest object to the test case?
you should mock out the request object using a mocking library, like http://code.google.com/p/mockito/
public void testCheckBatchExecutionSchedule() throws Exception
{
HttpServletRequest mockRequest = mock(HttpServletRequest.class);
//setup the behaviour here (or do it in setup method or something)
when(mockRequest.getParameter("parameterName")).thenReturn("someValue");
assertTrue("Batch is Completed :", returnPointsRatingDisputeFrom.checkBatchExecutionSchedule(mockRequest));
}
Spring provides a class called MockHttpServletRequest, which can be used to test code that needs a HttpServletRequest.
public void testCheckBatchExecutionSchedule() throws Exception
{
MockHttpServletRequest request = new MockHttpServletRequest();
request.addParameter("parameterName", "someValue");
assertTrue("Batch is Completed :", returnPointsRatingDisputeFrom.checkBatchExecutionSchedule(request));
}