@Test
public void testMatches() throws Exception {

    JMXLocationResolver resolver = new JMXLocationResolver();
    Assert.assertTrue(resolver.matches(new JMXNodeLocation("domain:one=*,two=2"),
            new JMXNodeLocation("domain:one=1,two=2")));
    Assert.assertTrue(resolver.matches(new JMXNodeLocation("domain:one=1,two=*"),
            new JMXNodeLocation("domain:one=1,two=2")));
    Assert.assertTrue(resolver.matches(new JMXNodeLocation("domain:one=*,two=*"),
            new JMXNodeLocation("domain:one=1,two=2")));
    Assert.assertFalse(resolver.matches(new JMXNodeLocation("domain:one=1,two=XX"),
            new JMXNodeLocation("domain:one=1,two=2")));
}