@Test public void testEquals() { Map<String, ColumnSchema> columns = mock(Map.class); List<Set<String>> indexes = mock(List.class); new EqualsTester() .addEqualityGroup( new TableSchema(columns, 12L, true, indexes), new TableSchema(columns, 12L, true, indexes) ).testEquals(); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TableSchema)) { return false; } TableSchema that = (TableSchema) other; return Objects.equals(columns, that.getColumns()) && Objects.equals(maxRows, that.getMaxRows()) && Objects.equals(isRoot, that.getIsRoot()) && Objects.equals(indexes, that.getIndexes()); }
TableSchema { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TableSchema)) { return false; } TableSchema that = (TableSchema) other; return Objects.equals(columns, that.getColumns()) && Objects.equals(maxRows, that.getMaxRows()) && Objects.equals(isRoot, that.getIsRoot()) && Objects.equals(indexes, that.getIndexes()); } }
TableSchema { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TableSchema)) { return false; } TableSchema that = (TableSchema) other; return Objects.equals(columns, that.getColumns()) && Objects.equals(maxRows, that.getMaxRows()) && Objects.equals(isRoot, that.getIsRoot()) && Objects.equals(indexes, that.getIndexes()); } @JsonCreator  TableSchema(
      @JsonProperty(value = "columns", required = true) Map<String,
          ColumnSchema> columns,
      @JsonProperty(value = "maxRows") Long maxRows,
      @JsonProperty(value = "isRoot") Boolean isRoot,
      @JsonProperty(value = "indexes") List<Set<String>> indexes
  ); }
TableSchema { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TableSchema)) { return false; } TableSchema that = (TableSchema) other; return Objects.equals(columns, that.getColumns()) && Objects.equals(maxRows, that.getMaxRows()) && Objects.equals(isRoot, that.getIsRoot()) && Objects.equals(indexes, that.getIndexes()); } @JsonCreator  TableSchema(
      @JsonProperty(value = "columns", required = true) Map<String,
          ColumnSchema> columns,
      @JsonProperty(value = "maxRows") Long maxRows,
      @JsonProperty(value = "isRoot") Boolean isRoot,
      @JsonProperty(value = "indexes") List<Set<String>> indexes
  ); Map<String, ColumnSchema> getColumns(); Long getMaxRows(); Boolean getIsRoot(); List<Set<String>> getIndexes(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
TableSchema { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TableSchema)) { return false; } TableSchema that = (TableSchema) other; return Objects.equals(columns, that.getColumns()) && Objects.equals(maxRows, that.getMaxRows()) && Objects.equals(isRoot, that.getIsRoot()) && Objects.equals(indexes, that.getIndexes()); } @JsonCreator  TableSchema(
      @JsonProperty(value = "columns", required = true) Map<String,
          ColumnSchema> columns,
      @JsonProperty(value = "maxRows") Long maxRows,
      @JsonProperty(value = "isRoot") Boolean isRoot,
      @JsonProperty(value = "indexes") List<Set<String>> indexes
  ); Map<String, ColumnSchema> getColumns(); Long getMaxRows(); Boolean getIsRoot(); List<Set<String>> getIndexes(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }