JvmAgent { public static void premain(String agentArgs, Instrumentation inst) { startAgent(new JvmAgentConfig(agentArgs), true , inst); } private  JvmAgent(); static void premain(String agentArgs, Instrumentation inst); static void agentmain(String agentArgs, Instrumentation instrumentation); static final String JOLOKIA_AGENT_URL; }
@Test public void premain() throws IOException { JvmAgent.premain("port=" + EnvTestUtil.getFreePort(), null); JvmAgent.agentmain("mode=stop", null); }