ApiConfigLoader { public ApiConfig reloadConfiguration(ServiceContext serviceContext, Class<?> endpointClass, ApiConfig oldConfig) throws ApiConfigException { ApiConfig config = configFactory.copy(oldConfig); List<ApiConfigSource> apiMethodConfigSources = Lists.newArrayList(); for (ApiConfigSource apiConfigSource : apiConfigSources) { if (!apiConfigSource.isStaticConfig(config)) { apiConfigSource.loadEndpointClass(serviceContext, endpointClass, config); apiMethodConfigSources.add(apiConfigSource); } } for (ApiConfigSource apiConfigSource : apiMethodConfigSources) { apiConfigSource.loadEndpointMethods( serviceContext, endpointClass, config.getApiClassConfig().getMethods()); } return config; } ApiConfigLoader(ApiConfig.Factory configFactory, TypeLoader typeLoader,
      ApiConfigAnnotationReader annotationSource, ApiConfigSource... apiConfigSources);  ApiConfigLoader(); ApiConfig loadConfiguration(ServiceContext serviceContext, Class<?> endpointClass); ApiConfig loadInternalConfiguration(ServiceContext serviceContext,
      Class<?> endpointClass); boolean isStaticConfig(ApiConfig config); ApiConfig reloadConfiguration(ServiceContext serviceContext, Class<?> endpointClass,
      ApiConfig oldConfig); static final String INTERNAL_API_NAME; }
@Test public void testReloadConfiguration() throws Exception { Mockito.when(datastoreSource.isStaticConfig(config2)).thenReturn(false); assertSame(config2, loader.reloadConfiguration(serviceContext, endpointClass, config)); Mockito.verify(annotationSource, never()).loadEndpointClass( serviceContext, endpointClass, config2); Mockito.verify(annotationSource, never()).loadEndpointMethods( serviceContext, endpointClass, methodsMap); Mockito.verify(datastoreSource).loadEndpointClass(serviceContext, endpointClass, config2); Mockito.verify(datastoreSource).loadEndpointMethods(serviceContext, endpointClass, methodsMap); }