Program: 177202
Project: 177202
Buggy source:
/** 
 * Tests handling that the noun and proper noun are property extracted from the request.
 */
public void testHandleRequestInternal() throws Exception {
  RESTResourceXMLExporter exporter=new RESTResourceXMLExporter("String_Node_Str","String_Node_Str",new RESTResource("String_Node_Str")){
    @Override protected ModelAndView handleRESTOperation(    String properNoun,    VerbType verb,    HttpServletRequest request,    HttpServletResponse response) throws Exception {
      request.setAttribute("String_Node_Str",properNoun);
      request.setAttribute("String_Node_Str",verb);
      return null;
    }
  }
;
  HttpServletRequest request=createMock(HttpServletRequest.class);
  HttpServletResponse response=createMock(HttpServletResponse.class);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getMethod()).andReturn("String_Node_Str");
  request.setAttribute("String_Node_Str","String_Node_Str");
  request.setAttribute("String_Node_Str",VerbType.read);
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
  reset(request,response);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getMethod()).andReturn("String_Node_Str");
  request.setAttribute("String_Node_Str","String_Node_Str");
  request.setAttribute("String_Node_Str",VerbType.create);
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
  reset(request,response);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getMethod()).andReturn("String_Node_Str");
  request.setAttribute("String_Node_Str",null);
  request.setAttribute("String_Node_Str",VerbType.update);
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
  reset(request,response);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getMethod()).andReturn("String_Node_Str");
  request.setAttribute("String_Node_Str",null);
  request.setAttribute("String_Node_Str",VerbType.delete);
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
  reset(request,response);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  response.sendError(HttpServletResponse.SC_NOT_FOUND,"String_Node_Str");
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
  reset(request,response);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  response.sendError(HttpServletResponse.SC_NOT_FOUND,"String_Node_Str");
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
}

Fixed version (ground truth):
/** 
 * Tests handling that the noun and proper noun are property extracted from the request.
 */
public void testHandleRequestInternal() throws Exception {
  RESTResource restResource=new RESTResource("String_Node_Str"){
    @Override public Set<VerbType> getSupportedVerbs(){
      return new TreeSet(Arrays.asList(VerbType.values()));
    }
  }
;
  RESTResourceXMLExporter exporter=new RESTResourceXMLExporter(restResource){
    @Override protected ModelAndView handleRESTOperation(    String properNoun,    VerbType verb,    HttpServletRequest request,    HttpServletResponse response) throws Exception {
      request.setAttribute("String_Node_Str",properNoun);
      request.setAttribute("String_Node_Str",verb);
      return null;
    }
  }
;
  exporter.setApplicationContext(new GenericApplicationContext());
  HttpServletRequest request=createMock(HttpServletRequest.class);
  HttpServletResponse response=createMock(HttpServletResponse.class);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getMethod()).andReturn("String_Node_Str");
  request.setAttribute("String_Node_Str","String_Node_Str");
  request.setAttribute("String_Node_Str",VerbType.read);
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
  reset(request,response);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getMethod()).andReturn("String_Node_Str");
  request.setAttribute("String_Node_Str","String_Node_Str");
  request.setAttribute("String_Node_Str",VerbType.create);
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
  reset(request,response);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getMethod()).andReturn("String_Node_Str");
  request.setAttribute("String_Node_Str",null);
  request.setAttribute("String_Node_Str",VerbType.update);
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
  reset(request,response);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getMethod()).andReturn("String_Node_Str");
  request.setAttribute("String_Node_Str",null);
  request.setAttribute("String_Node_Str",VerbType.delete);
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
  reset(request,response);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  response.sendError(HttpServletResponse.SC_NOT_FOUND,"String_Node_Str");
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
  reset(request,response);
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  expect(request.getRequestURI()).andReturn("String_Node_Str");
  response.sendError(HttpServletResponse.SC_NOT_FOUND,"String_Node_Str");
  replay(request,response);
  exporter.handleRequestInternal(request,response);
  verify(request,response);
}