@Test public void testEquals() { UUID uuid = UUID.randomUUID(); RowUpdate rowUpdate1 = new RowUpdate( null, new Row(ImmutableMap.of("name", Atom.string("ps1"))) ); Map<UUID, RowUpdate> rowUpdates1 = ImmutableMap.of(uuid, rowUpdate1); RowUpdate rowUpdate2 = new RowUpdate().setNew(new Row().stringColumn("name", "ps1")); Map<UUID, RowUpdate> rowUpdates2= new HashMap<>(); rowUpdates2.put(uuid, rowUpdate2); new EqualsTester() .addEqualityGroup(new TableUpdate(rowUpdates1), new TableUpdate(rowUpdates2)) .testEquals(); }
@Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TableUpdate)) { return false; } TableUpdate that = (TableUpdate) other; return Objects.equals(rowUpdates, that.getRowUpdates()); }
TableUpdate { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TableUpdate)) { return false; } TableUpdate that = (TableUpdate) other; return Objects.equals(rowUpdates, that.getRowUpdates()); } }
TableUpdate { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TableUpdate)) { return false; } TableUpdate that = (TableUpdate) other; return Objects.equals(rowUpdates, that.getRowUpdates()); } TableUpdate(Map<UUID, RowUpdate> rowUpdates); }
TableUpdate { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TableUpdate)) { return false; } TableUpdate that = (TableUpdate) other; return Objects.equals(rowUpdates, that.getRowUpdates()); } TableUpdate(Map<UUID, RowUpdate> rowUpdates); Map<UUID, RowUpdate> getRowUpdates(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); }
TableUpdate { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof TableUpdate)) { return false; } TableUpdate that = (TableUpdate) other; return Objects.equals(rowUpdates, that.getRowUpdates()); } TableUpdate(Map<UUID, RowUpdate> rowUpdates); Map<UUID, RowUpdate> getRowUpdates(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }