HttpWebService extends ServletBase { protected boolean hasActionInBody( final HttpServletRequest request ) { String payload; try { payload = getPayloadAsString( request ); } catch ( IOException e ) { if ( HttpWebService.logger.isErrorEnabled() ) { HttpWebService.logger.error( e ); } return false; } if ( ( null != payload ) && ( payload.length() > 0 ) ) { Map parameters = getParameterMapFromPayload( payload ); Object obj = parameters.get( "action" ); if ( ( null != obj ) && obj.toString().equalsIgnoreCase( "securitydetails" ) ) { return true; } } return false; } HttpWebService(); @Override Log getLogger(); String getPayloadAsString( final HttpServletRequest request ); void doGetFixMe( final HttpServletRequest request, final HttpServletResponse response ); @Override void doGet( final HttpServletRequest request, final HttpServletResponse response );  }
@Test public void testHasActionInBody() throws Exception { payload = "<SOAP-ENV:Envelope xmlns:SOAP-ENV=\"http: reader = new BufferedReader( new StringReader( payload ) ); when( request.getReader() ).thenReturn( reader ); assertTrue( httpWebService.hasActionInBody( request ) ); }