@Test public void testEquals() { final List<TestEntry> ops1 = new LinkedList<>(); ops1.add(entry1); final List<TestEntry> ops2 = new LinkedList<>(); ops2.add(entry2); final TestOperation op1 = new TestOperation(ops1); final TestOperation sameAsOp1 = new TestOperation(ops1); final TestOperation op2 = new TestOperation(ops2); new EqualsTester() .addEqualityGroup(op1, sameAsOp1) .addEqualityGroup(op2) .testEquals(); }
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null) { return false; } if (getClass() != o.getClass()) { return false; } BatchOperation<?> other = (BatchOperation<?>) o; return this.ops.equals(other.ops); }
BatchOperation { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null) { return false; } if (getClass() != o.getClass()) { return false; } BatchOperation<?> other = (BatchOperation<?>) o; return this.ops.equals(other.ops); } }
BatchOperation { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null) { return false; } if (getClass() != o.getClass()) { return false; } BatchOperation<?> other = (BatchOperation<?>) o; return this.ops.equals(other.ops); } BatchOperation();  BatchOperation(Collection<T> batchOperations); }
BatchOperation { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null) { return false; } if (getClass() != o.getClass()) { return false; } BatchOperation<?> other = (BatchOperation<?>) o; return this.ops.equals(other.ops); } BatchOperation();  BatchOperation(Collection<T> batchOperations); void clear(); int size(); List<T> getOperations(); BatchOperation<T> addOperation(T entry); boolean addAll(BatchOperation<T> another); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); }
BatchOperation { @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null) { return false; } if (getClass() != o.getClass()) { return false; } BatchOperation<?> other = (BatchOperation<?>) o; return this.ops.equals(other.ops); } BatchOperation();  BatchOperation(Collection<T> batchOperations); void clear(); int size(); List<T> getOperations(); BatchOperation<T> addOperation(T entry); boolean addAll(BatchOperation<T> another); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }