### Question:
LoadBalancingPluginLoader { public static void validate( Config config, Log log ) throws InvalidSettingException { LoadBalancingPlugin plugin = findPlugin( config ); plugin.validate( config, log ); } private  LoadBalancingPluginLoader(); static void validate( Config config, Log log ); static LoadBalancingProcessor load( TopologyService topologyService, LeaderLocator leaderLocator,
            LogProvider logProvider, Config config );  }### Answer:
@Test public void shouldThrowOnInvalidPlugin() { Config config = Config.defaults( CausalClusteringSettings.load_balancing_plugin, DOES_NOT_EXIST ); try { LoadBalancingPluginLoader.validate( config, mock( Log.class ) ); fail(); } catch ( InvalidSettingException ignored ) { } }
@Test public void shouldNotAcceptInvalidSetting() { Config config = Config.builder() .withSetting( settingFor( DUMMY_PLUGIN_NAME, DummyLoadBalancingPlugin.DO_NOT_USE_THIS_CONFIG ), "true") .withSetting( CausalClusteringSettings.load_balancing_plugin, DUMMY_PLUGIN_NAME ).build(); try { LoadBalancingPluginLoader.validate( config, mock( Log.class ) ); fail(); } catch ( InvalidSettingException ignored ) { } }