@Test
	public void testGetByName() {
		assertThat(RuleType.getByName("").isPresent()).isEqualTo(Boolean.FALSE);
		assertThat(RuleType.getByName("test").isPresent()).isEqualTo(Boolean.FALSE);
		assertThat(RuleType.getByName("param_flow").isPresent()).isEqualTo(Boolean.FALSE);
		assertThat(RuleType.getByName("param").isPresent()).isEqualTo(Boolean.FALSE);
		assertThat(RuleType.getByName("FLOW").isPresent()).isEqualTo(Boolean.FALSE);
		assertThat(RuleType.getByName("flow").isPresent()).isEqualTo(Boolean.TRUE);
		assertThat(RuleType.getByName("degrade").isPresent()).isEqualTo(Boolean.TRUE);
		assertThat(RuleType.getByName("param-flow").isPresent()).isEqualTo(Boolean.TRUE);
		assertThat(RuleType.getByName("system").isPresent()).isEqualTo(Boolean.TRUE);
		assertThat(RuleType.getByName("authority").isPresent()).isEqualTo(Boolean.TRUE);
		assertThat(RuleType.getByName("flow").get()).isEqualTo(RuleType.FLOW);
		assertThat(RuleType.getByName("degrade").get()).isEqualTo(RuleType.DEGRADE);
		assertThat(RuleType.getByName("param-flow").get()).isEqualTo(RuleType.PARAM_FLOW);
		assertThat(RuleType.getByName("system").get()).isEqualTo(RuleType.SYSTEM);
		assertThat(RuleType.getByName("authority").get()).isEqualTo(RuleType.AUTHORITY);
	}
@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/RuleTypeTests.java