ServicesUtil { public static FoundationService getFoundationService(){ return load(FoundationService.class); }  static Config getConfigService(); static FoundationService getFoundationService(); static LogoutHandler getLogoutHandler(); static UserInfoHolder getUserInfoHolder(); static UserInfo getUserInfo(); static MetricProxy getMetricProxy(); static OuterClientService getOuterClientService(); static DcMapper getDcMapperService(); static Organization getOrganizationService(); static EmailService getEmailService(); @SuppressWarnings("unchecked") static T load(Class<T> clazz);  }
@Test public void testFoundationService(){ FoundationService foundationService = ServicesUtil.getFoundationService(); Assert.assertTrue(foundationService instanceof DefaultFoundationService); FoundationService foundationService2 = ServicesUtil.getFoundationService(); Assert.assertEquals(foundationService, foundationService2); }