YamlRuleConfigurationSwapperEngine { @SneakyThrows(ReflectiveOperationException.class) public static Map<String, Class<?>> getYamlShortcuts() { Map<String, Class<?>> result = new HashMap<>(); for (YamlRuleConfigurationSwapper each : ShardingSphereServiceLoader.newServiceInstances(YamlRuleConfigurationSwapper.class)) { Class<?> yamlRuleConfigurationClass = Class.forName(((ParameterizedType) each.getClass().getGenericInterfaces()[0]).getActualTypeArguments()[0].getTypeName()); result.put("!" + each.getRuleTagName(), yamlRuleConfigurationClass); } return result; }  @SuppressWarnings("unchecked") Collection<YamlRuleConfiguration> swapToYamlConfigurations(final Collection<RuleConfiguration> ruleConfigurations); Collection<RuleConfiguration> swapToRuleConfigurations(final Collection<YamlRuleConfiguration> yamlRuleConfigs); @SneakyThrows(ReflectiveOperationException.class) static Map<String, Class<?>> getYamlShortcuts();  }
@Test public void assertGetYamlShortcuts() { Map<String, Class<?>> actual = YamlRuleConfigurationSwapperEngine.getYamlShortcuts(); assertThat(actual.size(), is(1)); }