@Test
	public void testNacosFactoryBeanProperties() throws Exception {
		NacosDataSourceFactoryBean factoryBean = spy(new NacosDataSourceFactoryBean());

		Converter converter = mock(SentinelConverter.class);

		factoryBean.setDataId(dataId);
		factoryBean.setGroupId(groupId);
		factoryBean.setAccessKey(accessKey);
		factoryBean.setSecretKey(secretKey);
		factoryBean.setEndpoint(endpoint);
		factoryBean.setNamespace(namespace);
		factoryBean.setConverter(converter);

		NacosDataSource nacosDataSource = mock(NacosDataSource.class);

		doReturn(nacosDataSource).when(factoryBean).getObject();
		when(nacosDataSource.readSource()).thenReturn("{}");

		assertThat(factoryBean.getObject()).isEqualTo(nacosDataSource);
		assertThat(factoryBean.getObject().readSource()).isEqualTo("{}");
		assertThat(factoryBean.getConverter()).isEqualTo(converter);
		assertThat(factoryBean.getDataId()).isEqualTo(dataId);
		assertThat(factoryBean.getGroupId()).isEqualTo(groupId);
		assertThat(factoryBean.getNamespace()).isEqualTo(namespace);
		assertThat(factoryBean.getEndpoint()).isEqualTo(endpoint);
		assertThat(factoryBean.getAccessKey()).isEqualTo(accessKey);
		assertThat(factoryBean.getSecretKey()).isEqualTo(secretKey);
	}
@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/NacosDataSourceFactoryBeanTests.java