class ImageToJsonTranslator {

  @VisibleForTesting
  @Nullable
  static ImmutableList<String> environmentMapToList(@Nullable Map<String, String> environment) {
    if (environment == null) {
      return null;
    }
    Preconditions.checkArgument(
        environment.keySet().stream().noneMatch(key -> key.contains("=")),
        "Illegal environment variable: name cannot contain '='");
    return environment
        .entrySet()
        .stream()
        .map(entry -> entry.getKey() + "=" + entry.getValue())
        .collect(ImmutableList.toImmutableList());
  }

  public  ImageToJsonTranslator(Image image);

}