### Question:
Utils { public static void clearWaitBeforeShutdownObserver() { CarbonUtils.checkSecurity(); waitBeforeShutdownObserver = new LinkedList<WaitBeforeShutdownObserver>(); }  static void setRegistryService(RegistryService service); static RegistryService getRegistryService(); static WaitBeforeShutdownObserver[] getWaitBeforeShutdownObservers(); static void setWaitBeforeShutdownObserver(WaitBeforeShutdownObserver service); static void clearWaitBeforeShutdownObserver(); static Registry getRegistry(); static String getDefaultEventingServiceURL(); static void setDefaultEventingServiceURL(String defaultEventingServiceURL); static String getRemoteTopicHeaderName(); static void setRemoteTopicHeaderName(String remoteTopicHeaderName); static String getRemoteTopicHeaderNS(); static void setRemoteTopicHeaderNS(String remoteTopicHeaderNS); static String getRemoteSubscriptionStoreContext(); static void setRemoteSubscriptionStoreContext(String remoteSubscriptionStoreContext); static boolean isIndexingConfigAvailable();  }### Answer:
@Test public void testClearWaitBeforeShutdownObserver() throws Exception { WaitBeforeShutdownObserver service1 = Mockito.mock(WaitBeforeShutdownObserver.class); Utils.setWaitBeforeShutdownObserver(service1); Utils.clearWaitBeforeShutdownObserver(); assertEquals(0, Utils.getWaitBeforeShutdownObservers().length); }