@Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ExclusiveResource that = (ExclusiveResource) o;
    return Objects.equals(key, that.key) && mode == that.mode;
  }
An exclusive resource identified by a key with a lock mode that is used to
synchronize access to shared resources when executing nodes in parallel.

@since 2.0
spock-core/src/main/java/org/spockframework/runtime/model/parallel/ExclusiveResource.java