@Override
	public ConfigData load(ConfigDataLoaderContext context, PolarisConfigDataResource resource)
			throws ConfigDataResourceNotFoundException {
		try {
			return load(context.getBootstrapContext(), resource);
		}
		catch (Exception e) {
			log.warn("Error getting properties from polaris: " + resource, e);
			if (!resource.isOptional()) {
				throw new ConfigDataResourceNotFoundException(resource, e);
			}
			return null;
		}
	}
@Test
	public void loadConfigDataInternalConfigFilesTest() {
		try (MockedStatic<ConfigFileServiceFactory> mockedStatic = mockStatic(ConfigFileServiceFactory.class)) {
			ConfigDataLoaderContext context = mock(ConfigDataLoaderContext.class);
			PolarisConfigDataResource polarisConfigDataResource = mock(PolarisConfigDataResource.class);
			ConfigurableBootstrapContext bootstrapContext = mock(ConfigurableBootstrapContext.class);
			PolarisConfigProperties polarisConfigProperties = mock(PolarisConfigProperties.class);
			PolarisContextProperties polarisContextProperties = mock(PolarisContextProperties.class);
			ConfigFileService configFileService = mock(ConfigFileService.class);
			Profiles profiles = mock(Profiles.class);
			Map<String, Object> emptyMap = new HashMap<>();
			ConfigKVFile emptyConfigFile = new MockedConfigKVFile(emptyMap);
			when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "application.yml")).thenReturn(emptyConfigFile);
			when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "application.yaml")).thenReturn(emptyConfigFile);
			when(configFileService.getConfigPropertiesFile(testNamespace, testServiceName, "bootstrap.properties")).thenReturn(emptyConfigFile);
			when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "bootstrap.yml")).thenReturn(emptyConfigFile);
			when(configFileService.getConfigYamlFile(testNamespace, testServiceName, "bootstrap.yaml")).thenReturn(emptyConfigFile);
			Map<String, Object> applicationProperties = new HashMap<>();
			applicationProperties.put("k1", "v1");
			applicationProperties.put("k2", "v2");
			applicationProperties.put("k3", "v3");
			ConfigKVFile propertiesFile = new MockedConfigKVFile(applicationProperties);
			when(configFileService.getConfigPropertiesFile(testNamespace, testServiceName, "application.properties"))
					.thenReturn(propertiesFile);
			when(context.getBootstrapContext()).thenReturn(bootstrapContext);

			when(polarisContextProperties.getNamespace()).thenReturn(testNamespace);
			when(polarisContextProperties.getService()).thenReturn(testServiceName);

			when(polarisConfigProperties.getGroups()).thenReturn(null);
			when(polarisConfigProperties.isInternalEnabled()).thenReturn(true);
			when(profiles.getActive()).thenReturn(Lists.newArrayList());

			PolarisConfigDataLoader polarisConfigDataLoader = new PolarisConfigDataLoader(new DeferredLogs());
			if (INTERNAL_CONFIG_FILES_LOADED.get()) {
				INTERNAL_CONFIG_FILES_LOADED.compareAndSet(true, false);
			}
			if (CUSTOM_POLARIS_CONFIG_FILE_LOADED.get()) {
				CUSTOM_POLARIS_CONFIG_FILE_LOADED.compareAndSet(true, false);
			}
			when(polarisConfigDataResource.getPolarisConfigProperties()).thenReturn(polarisConfigProperties);
			when(polarisConfigDataResource.getPolarisContextProperties()).thenReturn(polarisContextProperties);
			when(polarisConfigDataResource.getServiceName()).thenReturn(testServiceName);
			when(polarisConfigDataResource.getProfiles()).thenReturn(profiles);

			mockedStatic.when(() -> {
				ConfigFileServiceFactory.createConfigFileService(any(SDKContext.class));
			}).thenReturn(configFileService);

			ConfigData configData = polarisConfigDataLoader.load(context, polarisConfigDataResource);
			List<PropertySource<?>> propertySources = configData.getPropertySources();
			CompositePropertySource compositePropertySource = new CompositePropertySource(polarisConfigPropertySourceName);
			propertySources.forEach(compositePropertySource::addPropertySource);
			assertThat(compositePropertySource.getProperty("k1")).isEqualTo("v1");
			assertThat(compositePropertySource.getProperty("k2")).isEqualTo("v2");
			assertThat(compositePropertySource.getProperty("k3")).isEqualTo("v3");
		}
	}