@Test
void testPartialGlobMatch() {

    Map<String, String> ruleAttributes = new HashMap<>();
    ruleAttributes.put("ip", "127.*.1");
    ruleAttributes.put("compression", "*");
    Map<String, String> reqAttributes = new HashMap<>();
    reqAttributes.put("ip", "127.0.0.1");
    reqAttributes.put("compression", "gzip");
    reqAttributes.put("encoding", "json");
    SamplingRule rule = new SamplingRule()
        .withAttributes(ruleAttributes)
        .withHost("*")
        .withServiceName("*.foo.*")
        .withHTTPMethod("*")
        .withResourceARN("*")
        .withURLPath("/bar/*")
        .withServiceType("AWS::EC2::Instance");
    SamplingRequest req = new SamplingRequest(
        "role-arn",
        "arn:aws:service:us-east-1:111111111111:resource",
        "www.foo.com",
        "192.168.1.1",
        "GET",
        "/bar/baz",
        "AWS::EC2::Instance",
        reqAttributes
    );
    Matchers m = new Matchers(rule);
    Assertions.assertTrue(m.match(req));
}