@Test
public void readConfig() throws IOException {

    String path = copyResourceToTemp("/agent-test.properties");
    JvmAgentConfig config = new JvmAgentConfig("config=" + path);
    assertEquals(config.getProtocol(), "https");
    Authenticator authenticator = config.getAuthenticator();
    assertNotNull(authenticator);
    assertEquals(config.getClientPrincipals().get(0),"O=jolokia.org,OU=JVM");
    assertTrue(authenticator instanceof UserPasswordAuthenticator);
    assertTrue(((UserPasswordAuthenticator) authenticator).checkCredentials("roland", "s!cr!t"));
}