EncryptRuleBuilder implements ShardingSphereRuleBuilder<EncryptRule, EncryptRuleConfiguration> { @Override public EncryptRule build(final EncryptRuleConfiguration ruleConfig, final Collection<String> dataSourceNames) { return new EncryptRule(ruleConfig); }  @Override EncryptRule build(final EncryptRuleConfiguration ruleConfig, final Collection<String> dataSourceNames); @Override int getOrder(); @Override Class<EncryptRuleConfiguration> getTypeClass();  }
@SuppressWarnings({"rawtypes", "unchecked"}) @Test public void assertBuild() { EncryptRuleConfiguration ruleConfig = mock(EncryptRuleConfiguration.class); ShardingSphereRuleBuilder builder = OrderedSPIRegistry.getRegisteredServices(Collections.singletonList(ruleConfig), ShardingSphereRuleBuilder.class).get(ruleConfig); assertThat(builder.build(ruleConfig, Collections.emptyList()), instanceOf(EncryptRule.class)); }