@Override protected void service( HttpServletRequest req, HttpServletResponse resp ) throws IOException {
    if ( isJettyMode() && !req.getContextPath().endsWith( getContextPath() ) ) {
      return;
    }

    if ( log.isDebug() ) {
      logDebug( getService() );
    }

    handleRequest( new CarteRequestImpl( req, resp ) );
  }
@Test
  public void testService() throws Exception {
    when( req.getContextPath() ).thenReturn( "/Path" );
    when( baseCartePlugin.getContextPath() ).thenReturn( "/Path" );
    when( log.isDebug() ).thenReturn( true );

    baseCartePlugin.service( req, resp );

    verify( log ).logDebug( baseCartePlugin.getService() );
    verify( baseCartePlugin ).handleRequest( carteReqCaptor.capture() );

    CarteRequestHandler.CarteRequest carteRequest = carteReqCaptor.getValue();

    testCarteRequest( carteRequest );
    testCarteResponse( carteRequest.respond( 200 ) );
  }