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