@Test
public void testApplyTemplate() throws Exception {

    JMXLocationResolver resolver = new JMXLocationResolver();
    JMXNodeLocation location = new JMXNodeLocation("domain:one=1,two=2");
    String endpointName = "eName";
    String str = resolver.applyTemplate("hello", location, endpointName);
    Assert.assertEquals("hello", str);
    str = resolver.applyTemplate("hello %two%", location, endpointName);
    Assert.assertEquals("hello 2", str);
    str = resolver.applyTemplate("hello %one% %two%", location, endpointName);
    Assert.assertEquals("hello 1 2", str);
    str = resolver.applyTemplate("hello %one%.%two%.[%_ManagedServerName%]", location, endpointName);
    Assert.assertEquals("hello 1.2.[eName]", str);
}