### Question:
Utils { public static WaitBeforeShutdownObserver[] getWaitBeforeShutdownObservers() { return waitBeforeShutdownObserver.toArray( new WaitBeforeShutdownObserver[waitBeforeShutdownObserver.size()]); }  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 testGetWaitBeforeShutdownObservers() throws Exception { WaitBeforeShutdownObserver service1 = Mockito.mock(WaitBeforeShutdownObserver.class); Utils.setWaitBeforeShutdownObserver(service1); WaitBeforeShutdownObserver service2 = Mockito.mock(WaitBeforeShutdownObserver.class); Utils.setWaitBeforeShutdownObserver(service2); WaitBeforeShutdownObserver[] serviceArray = new WaitBeforeShutdownObserver[] {service1, service2}; assertArrayEquals(serviceArray, Utils.getWaitBeforeShutdownObservers()); }