### Question:
CommonUtil { public static RegistryService getRegistryService() { return registryService; }  static synchronized void setRegistryService(RegistryService service); static RegistryService getRegistryService(); static UserRegistry getRegistry(HttpSession session);  }### Answer:
@Test public void testGetRegistryService() throws Exception { RegistryService service = mock(RegistryService.class); CommonUtil.setRegistryService(service); assertEquals(service, CommonUtil.getRegistryService()); }