### Question:
ConfigurationValueTableInputGenerator extends ConfigurationValue<TableInputGenerator, ConfigurationRequirementTableInput> { @Override public void triggerSetValue(Algorithm algorithm, Set<Class<?>> algorithmInterfaces) throws AlgorithmConfigurationException { if (!algorithmInterfaces.contains(AlgorithmType.TABLE_INPUT.getAlgorithmClass())) { throw new AlgorithmConfigurationException( "Algorithm does not accept table input configuration values."); } TableInputParameterAlgorithm tableInputParameterAlgorithm = (TableInputParameterAlgorithm) algorithm; tableInputParameterAlgorithm.setTableInputConfigurationValue(identifier, values); } protected  ConfigurationValueTableInputGenerator();  ConfigurationValueTableInputGenerator(String identifier,
                                               TableInputGenerator... values);  ConfigurationValueTableInputGenerator(ConfigurationRequirementTableInput requirement); @Override void triggerSetValue(Algorithm algorithm, Set<Class<?>> algorithmInterfaces);  }### Answer:
@Test public void testTriggerSetValue() throws AlgorithmConfigurationException { TableInputParameterAlgorithm algorithm = mock(TableInputParameterAlgorithm.class); Set<Class<?>> interfaces = new HashSet<>(); interfaces.add(AlgorithmType.TABLE_INPUT.getAlgorithmClass()); String expectedIdentifier = "configId1"; TableInputGenerator[] expectedConfigurationValue = {mock(TableInputGenerator.class), mock(TableInputGenerator.class)}; ConfigurationValueTableInputGenerator configValue = new ConfigurationValueTableInputGenerator(expectedIdentifier, expectedConfigurationValue); configValue.triggerSetValue(algorithm, interfaces); verify(algorithm) .setTableInputConfigurationValue(expectedIdentifier, expectedConfigurationValue); }
@Test public void testTriggerSetValueMissingInterface() { TableInputParameterAlgorithm algorithm = mock(TableInputParameterAlgorithm.class); Set<Class<?>> interfaces = new HashSet<>(); String expectedIdentifier = "configId1"; TableInputGenerator[] expectedConfigurationValues = {mock(TableInputGenerator.class), mock(TableInputGenerator.class)}; ConfigurationValueTableInputGenerator configValue = new ConfigurationValueTableInputGenerator(expectedIdentifier, expectedConfigurationValues); try { configValue.triggerSetValue(algorithm, interfaces); fail("No exception was thrown."); } catch (AlgorithmConfigurationException e) { } }