@Test
	public void testJsonConverter() {
		JsonConverter jsonConverter = new JsonConverter(objectMapper, FlowRule.class);
		List<FlowRule> flowRules = (List<FlowRule>) jsonConverter
				.convert(readFileContent("classpath: flowrule.json"));

		assertThat(flowRules.size()).isEqualTo(1);
		assertThat(flowRules.get(0).getResource()).isEqualTo("resource");
		assertThat(flowRules.get(0).getLimitApp()).isEqualTo("default");
		assertThat(String.valueOf(flowRules.get(0).getCount())).isEqualTo("1.0");
		assertThat(flowRules.get(0).getControlBehavior())
				.isEqualTo(RuleConstant.CONTROL_BEHAVIOR_DEFAULT);
		assertThat(flowRules.get(0).getStrategy())
				.isEqualTo(RuleConstant.STRATEGY_DIRECT);
		assertThat(flowRules.get(0).getGrade()).isEqualTo(RuleConstant.FLOW_GRADE_QPS);
	}
@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/SentinelConverterTests.java