class ExperimentManager {

    Experiment createSingleExperiment (Platform platform, String containerIdentifier, String experimentMethod) {
        Optional<Experiment> optionalExperiment = Optional.of(platform)
                                                          .map(platform1 -> platform1.getContainerByIdentifier(containerIdentifier))
                                                          .map(container -> container.createExperiment(experimentMethod));
        optionalExperiment.ifPresentOrElse(experiment -> log.debug("Created experiment {}", v("experiment", experiment)), () -> log
                .warn("Experiment of type {} could not be created for {} ", kv("experimentMethod", experimentMethod), kv("containerIdentifier", containerIdentifier)));
        return optionalExperiment.orElse(null);
    }

}