@Test
	public void testParseBeanDefinition() {
		ApolloDataSourceProperties dataSourceProperties = new ApolloDataSourceProperties();
		dataSourceProperties.setNamespaceName("application");
		dataSourceProperties.setFlowRulesKey("test-flow-rules");
		dataSourceProperties.setDefaultFlowRuleValue("[]");
		dataSourceProperties.setDataType("json");
		dataSourceProperties.setRuleType(RuleType.FLOW);
		String dataSourceName = "ds1" + "-sentinel-" + "apollo" + "-datasource";

		//init BeanDefinitionBuilder for ApolloDataSourceFactoryBean
		BeanDefinitionBuilder builder = sentinelDataSourceHandler.parseBeanDefinition(dataSourceProperties, dataSourceName);
		MutablePropertyValues propertyValues = builder.getBeanDefinition().getPropertyValues();

		//ApolloDataSourceFactoryBean has four parameters, $jacocoData should not be included
		assertThat(propertyValues.size()).isEqualTo(4);
		assertThat(propertyValues).noneMatch(propertyValue -> "$jacocoData".equals(propertyValue.getName()));
		assertThat(propertyValues).anyMatch(propertyValue -> "flowRulesKey".equals(propertyValue.getName())
				&& dataSourceProperties.getFlowRulesKey().equals(propertyValue.getValue()));
		assertThat(propertyValues).anyMatch(propertyValue -> "defaultFlowRuleValue".equals(propertyValue.getName())
				&& dataSourceProperties.getDefaultFlowRuleValue().equals(propertyValue.getValue()));
		assertThat(propertyValues).anyMatch(propertyValue -> "namespaceName".equals(propertyValue.getName())
				&& dataSourceProperties.getNamespaceName().equals(propertyValue.getValue()));
		assertThat(propertyValues).anyMatch(propertyValue -> "converter".equals(propertyValue.getName())
				&& propertyValue.getValue() instanceof RuntimeBeanReference value
				&& value.getBeanName().equals("sentinel-" + dataSourceProperties.getDataType() + "-" + dataSourceProperties.getRuleType().getName() + "-converter"));
	}
Test cases for {@link SentinelDataSourceHandler#parseBeanDefinition(AbstractDataSourceProperties, String)}.

@see com.alibaba.cloud.sentinel.datasource.config.ApolloDataSourceProperties
@see com.alibaba.cloud.sentinel.datasource.factorybean.ApolloDataSourceFactoryBean
spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-sentinel/src/test/java/com/alibaba/cloud/sentinel/custom/SentinelDataSourceHandlerTests.java