@Test
	public void testSentinelDataSourceSuccess() throws Exception {
		when(sentinelProperties.isEnabled()).thenReturn(true);
		SentinelConfig.setConfig(TransportConfig.CONSOLE_SERVER, "localhost:8080");
		when(heartbeatSender.sendHeartbeat()).thenReturn(true);

		Map<String, AbstractDataSource> dataSourceMap = new HashMap<>();

		FileRefreshableDataSource fileDataSource1 = mock(FileRefreshableDataSource.class);
		dataSourceMap.put("ds1-sentinel-file-datasource", fileDataSource1);

		FileRefreshableDataSource fileDataSource2 = mock(FileRefreshableDataSource.class);
		dataSourceMap.put("ds2-sentinel-file-datasource", fileDataSource2);

		when(beanFactory.getBeansOfType(AbstractDataSource.class))
				.thenReturn(dataSourceMap);

		Health health = sentinelHealthIndicator.health();

		assertThat(health.getStatus()).isEqualTo(Status.UP);
		Map<String, Status> dataSourceDetailMap = (Map<String, Status>) health
				.getDetails().get("dataSource");
		assertThat(dataSourceDetailMap.get("ds1-sentinel-file-datasource"))
				.isEqualTo(Status.UP);
		assertThat(dataSourceDetailMap.get("ds2-sentinel-file-datasource"))
				.isEqualTo(Status.UP);
	}
Test cases for {@link SentinelHealthIndicator}.

@author cdfive
spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-sentinel/src/test/java/com/alibaba/cloud/sentinel/endpoint/SentinelHealthIndicatorTests.java