@Test
	public void testGetInstancesFailureToleranceEnabled() throws NacosException {
		ServiceCache.setInstances("a", singletonList(serviceInstance));

		when(serviceDiscovery.getInstances("a")).thenThrow(new NacosException());
		ReflectionTestUtils.setField(client, "failureToleranceEnabled", true);

		List<ServiceInstance> instances = this.client.getInstances("a");

		assertThat(instances).isEqualTo(singletonList(serviceInstance));
	}
@author xiaojing
@author echooymxq
@author freeman
spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-nacos-discovery/src/test/java/com/alibaba/cloud/nacos/NacosDiscoveryClientTests.java