// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements.  See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership.  The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License.  You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied.  See the License for the
// specific language governing permissions and limitations
// under the License.

package org.openqa.selenium.remote;

import java.util.HashMap;
import java.util.Map;

public class Command {

  private SessionId sessionId;
  private String name;
  private Map<String, ?> parameters;

  public Command(SessionId sessionId, String name) {
    this(sessionId, name, new HashMap<>());
  }

  public Command(SessionId sessionId, String name, Map<String, ?> parameters) {
    this.sessionId = sessionId;
    this.parameters = parameters;
    this.name = name;
  }

  public SessionId getSessionId() {
    return sessionId;
  }

  public String getName() {
    return name;
  }

  public Map<String, ?> getParameters() {
    return parameters == null ? new HashMap<>() : parameters;
  }

  @Override
  public String toString() {
    return "[" + sessionId + ", " + name + " " + parameters + "]";
  }
}

@@ -881,16 +881,42 @@
 til.Map;
+%0Aimport java.util.Objects;
 %0A%0Apublic
@@ -943,16 +943,22 @@
 private 
+final 
 SessionI
@@ -980,16 +980,22 @@
 private 
+final 
 String n
@@ -1009,16 +1009,22 @@
 private 
+final 
 Map%3CStri
@@ -1257,16 +1257,38 @@
 sionId;%0A
+    this.name = name;%0A
     this
@@ -1311,38 +1311,55 @@
 rameters
-;%0A    this.name = name
+ == null ? new HashMap%3C%3E() : parameters
 ;%0A  %7D%0A%0A 
@@ -1526,47 +1526,8 @@
 turn
- parameters == null ? new HashMap%3C%3E() :
  par
@@ -1651,11 +1651,413 @@
 %22%5D%22;%0A  %7D
+%0A%0A  @Override%0A  public boolean equals(Object o) %7B%0A    if (!(o instanceof Command)) %7B%0A      return false;%0A    %7D%0A%0A    Command that = (Command) o;%0A    return Objects.equals(sessionId, that.sessionId) &&%0A           Objects.equals(name, that.name) &&%0A           Objects.equals(parameters, that.parameters);%0A  %7D%0A%0A  @Override%0A  public int hashCode() %7B%0A    return Objects.hash(sessionId, name, parameters);%0A  %7D
 %0A%7D%0A

Add equals and hashCode to Command