### Question:
SpringProfilesInitializer implements InitializingBean, ApplicationContextAware { public void afterPropertiesSet() throws Exception { String[] configuredProfiles = getConfiguredProfiles(); String[] activeProfiles = ctx.getEnvironment().getActiveProfiles(); if (!ArrayUtils.isEquals(configuredProfiles, activeProfiles)) { logger.info("activate the spring context profiles '{}'", Arrays.toString(configuredProfiles)); ctx.getEnvironment().setActiveProfiles(configuredProfiles); ctx.refresh(); } else if (configuredProfiles.length == 0) { logger.info("no spring context profile activated"); } }  void setApplicationContext(ApplicationContext ac); void afterPropertiesSet(); static final String JDBC_DB; static final String GEARMAN; static final String INCINGA2; static final String CHECK_MK; static final String JSON; static final String CIPHER_INTERFACE; static final String CIPHER_ENV; }### Answer:
@Test(dataProvider = "profileProperties") public void testAfterPropertiesSet(String propertyFile, int countOfResultServices) throws Exception { SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE = BaseTest.SAKULI_HOME_FOLDER_PATH; SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE = BaseTest.SAHI_FOLDER_PATH; BeanLoader.CONTEXT_PATH = "loaderTest-beanRefFactory.xml"; Path testProps = Paths.get(getClass().getResource(propertyFile).toURI()); SakuliPropertyPlaceholderConfigurer.TEST_SUITE_FOLDER_VALUE = testProps.toString(); BeanLoader.refreshContext(); Map<String, ResultService> resultServiceMap = BeanLoader.loadMultipleBeans(ResultService.class); assertEquals(resultServiceMap.size(), countOfResultServices); final Map<String, CipherService> resultCipher = BeanLoader.loadMultipleBeans(CipherService.class); assertEquals(resultCipher.size(), 1); assertEquals(resultCipher.values().iterator().next().getClass(), EnvironmentCipher.class); }