@Test public void testPropertiesNotFound() throws IOException { new Expectations() { { OperateProperties.loadProperties(anyString); result = new IOException("file not found"); } }; try { databaseInit.postProcessBeanDefinitionRegistry(registry); fail("Must have exception"); } catch (BeansException e) { assertThat(e.getMessage(), is("Failed to load properties file, file name : localCache; nested exception is java.io.IOException: file not found")); } }
@Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) { createRegisterDbRelatedBdf(registry); }
DatabaseInit implements BeanDefinitionRegistryPostProcessor { @Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) { createRegisterDbRelatedBdf(registry); } }
DatabaseInit implements BeanDefinitionRegistryPostProcessor { @Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) { createRegisterDbRelatedBdf(registry); }  }
DatabaseInit implements BeanDefinitionRegistryPostProcessor { @Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) { createRegisterDbRelatedBdf(registry); }  @Override void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory); @Override void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry); }
DatabaseInit implements BeanDefinitionRegistryPostProcessor { @Override public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) { createRegisterDbRelatedBdf(registry); }  @Override void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory); @Override void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry);  }