@Test
	public void testRestTemplateBlockHandler() {

		assertThat(restTemplate.getInterceptors().size()).isEqualTo(2);
		assertThat(restTemplateWithBlockClass.getInterceptors().size()).isEqualTo(1);

		ResponseEntity responseEntityBlock = restTemplateWithBlockClass
				.getForEntity(flowUrl, String.class);

		assertThat(responseEntityBlock.getBody()).isEqualTo("Oops");
		assertThat(responseEntityBlock.getStatusCode()).isEqualTo(HttpStatus.OK);

		ResponseEntity responseEntityRaw = restTemplate.getForEntity(flowUrl,
				String.class);

		assertThat(responseEntityRaw.getBody())
				.isEqualTo("RestTemplate request block by sentinel");
		assertThat(responseEntityRaw.getStatusCode()).isEqualTo(HttpStatus.OK);
	}
@author <a href="mailto:fangjian0423@gmail.com">Jim</a>
@author jiashuai.xie
spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-sentinel/src/test/java/com/alibaba/cloud/sentinel/SentinelAutoConfigurationTests.java