@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"));
    }
}