@Test
public void startException() throws IOException {

    int port = EnvTestUtil.getFreePort();
    JvmAgent.agentmain("port=" + port, null);
    try {
        JvmAgent.agentmain("port=" + port, null);
    } finally {
     JvmAgent.agentmain("mode=stop", null);
    }
}