code: public Environment environment(String name, Project project, Map<String, Object> attributes) {
          Environment environment = new Environment(instance);
  
          environment.setName(name);
          environment.setProject(project);
          addAttributes(environment, attributes);
          environment.save();
  
          return environment;
      }
docs: Creates new Environment.
  
  @param name       Environment name.
  @param project    Parent Project.
  @param attributes Additional attributes that should be set for Environment.
  @return Newly created Environment.