### Question:
JMXConnectionUtil { public static String getPlatformMBeanServerAgentId() throws Exception { MBeanServer mbs = ManagementFactory.getPlatformMBeanServer(); final String SERVER_DELEGATE = "JMImplementation:type=MBeanServerDelegate"; final String MBEAN_SERVER_ID_KEY = "MBeanServerId"; ObjectName delegateObjName = new ObjectName(SERVER_DELEGATE); return (String) mbs.getAttribute(delegateObjName, MBEAN_SERVER_ID_KEY ); }  static String getPlatformMBeanServerAgentId(); static MBeanServerConnection attach(final String id);  }### Answer:
@Test public void testGetPlatformMBeanAgentID() throws Exception { String agentID = JMXConnectionUtil.getPlatformMBeanServerAgentId(); Assert.assertNotNull(agentID); }