During the test phase of my maven build I ave the following code in one @test method:
request.clearAttributes();
response.reset();
String story_uuid = qit.getQI().getStory_uuid();
assertNotNull(story);
request.setParameter("story_uuid", story_uuid);
request.setParameter("activity", "get");
queue.doPost(request, response);
assertEquals(response.getErrorMessage(), HttpServletResponse.SC_OK, response.getStatus());
request.clearAttributes();
response.reset(); //**THIS RESET HERE**//
request.setParameter("story", story_uuid);
request.setParameter("activity", "revert");
queue.doPost(request, response);
assertEquals(response.getErrorMessage(), HttpServletResponse.SC_OK, response.getStatus());
The line 'response.reset()' with the //THIS RESET HERE// causes the following error:
java.lang.IllegalStateException: Cannot reset buffer - response is already committed
Should I not be using one method to have multiple calls to my servlet?