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