@Test
	public void testFile() throws Exception {
		AnnotationConfigApplicationContext annotationConfigApplicationContext = new AnnotationConfigApplicationContext(
				TestConfig.class);
		assertThat(annotationConfigApplicationContext.getBean("fileBean")).isNotNull();
		FileRefreshableDataSource fileRefreshableDataSource = annotationConfigApplicationContext
				.getBean("fileBean", FileRefreshableDataSource.class);
		assertThat(((List<FlowRule>) fileRefreshableDataSource.loadConfig()).size())
				.isEqualTo(1);
		FileRefreshableDataSourceFactoryBean factoryBean = annotationConfigApplicationContext
				.getBean("&fileBean", FileRefreshableDataSourceFactoryBean.class);
		assertThat(factoryBean.getBufSize()).isEqualTo(1024);
		assertThat(factoryBean.getCharset()).isEqualTo("utf-8");
		assertThat(factoryBean.getRecommendRefreshMs()).isEqualTo(2000);
		assertThat(factoryBean.getFile()).isNotNull();
		assertThat(factoryBean.getConverter()).isNotNull();
	}
@author <a href="mailto:fangjian0423@gmail.com">Jim</a>
spring-cloud-alibaba-starters/spring-cloud-alibaba-sentinel-datasource/src/test/java/com/alibaba/cloud/sentinel/datasource/FileRefreshableDataSourceFactoryBeanTests.java