@Test
public void testIsParent() throws Exception {

    JMXLocationResolver jmx = new JMXLocationResolver();
    Assert.assertFalse(
            jmx.isParent(new JMXNodeLocation("domain:one=1"),
                    new JMXNodeLocation("domain:two=2")));
    Assert.assertFalse(
            jmx.isParent(new JMXNodeLocation("domain:one=1"),
                    new JMXNodeLocation("domain:one=111")));
    Assert.assertTrue(
            jmx.isParent(new JMXNodeLocation("domain:one=1,two=2"),
                    new JMXNodeLocation("domain:one=1,two=2,three=3")));
    // grandchild
    Assert.assertTrue(
            jmx.isParent(new JMXNodeLocation("domain:one=1"),
                    new JMXNodeLocation("domain:one=1,two=2,three=3")));
}