@Override
    public void process() {
        JMeterContext ctx = getThreadContext();
        Sampler sampler = ctx.getCurrentSampler();
        if (!(sampler instanceof HTTPSamplerBase)) {// Ignore non-HTTP samplers
            return;
        }
        SampleResult responseText = ctx.getPreviousResult();
        if (responseText == null) {
            return;
        }
        initRegex(getArgumentName());
        String text = responseText.getResponseDataAsString();
        String value;
        if (isPathExtension() && isPathExtensionNoEquals() && isPathExtensionNoQuestionmark()) {
            value = pathExtensionNoEqualsNoQuestionmarkExtractor.apply(text);
        } else if (isPathExtension() && isPathExtensionNoEquals()) { // && !isPathExtensionNoQuestionmark()
            value = pathExtensionNoEqualsQuestionmarkExtractor.apply(text);
        } else if (isPathExtension() && isPathExtensionNoQuestionmark()) { // && !isPathExtensionNoEquals()
            value = pathExtensionEqualsNoQuestionmarkExtractor.apply(text);
        } else if (isPathExtension()) { // && !isPathExtensionNoEquals() && !isPathExtensionNoQuestionmark()
            value = pathExtensionEqualsQuestionmarkExtractor.apply(text);
        } else { // if ! isPathExtension()
            value = parameterExtractor.apply(text);
        }

        // Bug 15025 - save session value across samplers
        if (shouldCache()) {
            if (value == null || value.isEmpty()) {
                value = savedValue;
            } else {
                savedValue = value;
            }
        }
        modify((HTTPSamplerBase) sampler, value);
    }
@Test
    public void testNonHTTPSampler() throws Exception {
        Sampler sampler = new NullSampler();
        response = new SampleResult();
        context.setCurrentSampler(sampler);
        context.setPreviousResult(response);
        mod.process();
    }