### Question:
MBeanServerHelper { public static void unregister(MBeanServer server, ObjectName name) throws JBIException { if (name != null) { if (server == null) { throw new JBIException("MBeanServer is null when registering MBean " + name); } try { doUnregister(server, name); } catch (JMException e) { throw new JBIException("Unable to unregister object with name " + name, e); } } }  static ObjectName register(MBeanServer server, ObjectName name, Object object); static void unregister(MBeanServer server, ObjectName name);  }### Answer:
@Test(expected = JBIException.class) public void testUnregisterNullServerThrowsJBIException() throws Exception { MBeanServerHelper.unregister(null, defaultObjectName); }