class FeatureService {

    public void reset(List<String> featuresToReset) throws NotFoundException {
        String codesInError = featuresToReset.stream()
                .filter(code -> !this.featureCollection.get(code).isPresent())
                .collect(Collectors.joining(", "));
        if (!codesInError.isEmpty()) {
            throw new NotFoundException("Unknown feature(s) '" + codesInError + "'.", Entities.FEATURE);
        }
        featuresToReset.forEach(code -> this.featureActivator.changeStateOf(code, this.featureActivator.isEnabledByDefault(code)));
    }

}