boolean filterUrl(HTTPSamplerBase sampler) {
        String domain = sampler.getDomain();
        if (domain == null || domain.isEmpty()) {
            return false;
        }

        String url = generateMatchUrl(sampler);
        CollectionProperty includePatterns = getIncludePatterns();
        if (!includePatterns.isEmpty() && !matchesPatterns(url, includePatterns)) {
            return false;
        }

        CollectionProperty excludePatterns = getExcludePatterns();
        if (!excludePatterns.isEmpty() && matchesPatterns(url, excludePatterns)) {
            return false;
        }

        return true;
    }
@Test
    public void testFilter1() throws Exception {
        sampler.setDomain("jakarta.org");
        sampler.setPath("index.jsp");
        assertTrue(control.filterUrl(sampler), "Should find jakarta.org/index.jsp");
    }