BatchIdentity { @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; BatchIdentity that = (BatchIdentity) o; return this.highestSequence == that.highestSequence && this.size == that.size && Objects.equals(this.timestampStr, that.timestampStr) && Objects.equals(this.logFile, that.logFile) && Objects.equals(this.logFileOffset, that.logFileOffset); } BatchIdentity(String timestampStr, int highestSequence, int size, @Nullable String logFile,
                @Nullable Integer logFileOffset); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); @Nullable static BatchIdentity valueFrom(Message message); @Nullable static String keyFrom(Message message);  }
@Test public void testEquals() { assertEquals(new BatchIdentity("2019-09-17T01:02:03.123Z", 6, 5, null, null), new BatchIdentity("2019-09-17T01:02:03.123Z", 6, 5, null, null)); assertEquals(new BatchIdentity("2019-09-17T01:02:03.123Z", 1, 5, "test.log", 123), new BatchIdentity("2019-09-17T01:02:03.123Z", 1, 5, "test.log", 123)); assertNotEquals(new BatchIdentity("2019-09-17T01:02:03.123Z", 1, 5, "test.log", 123), new BatchIdentity("2019-09-16T01:02:03.123Z", 1, 5, "test.log", 123)); assertNotEquals(new BatchIdentity("2019-09-17T01:02:03.123Z", 1, 5, "test.log", 123), new BatchIdentity("2019-09-17T01:02:03.123Z", 2, 5, "test.log", 123)); assertNotEquals(new BatchIdentity("2019-09-17T01:02:03.123Z", 1, 5, "test.log", 123), new BatchIdentity("2019-09-17T01:02:03.123Z", 1, 4, "test.log", 123)); assertNotEquals(new BatchIdentity("2019-09-17T01:02:03.123Z", 1, 5, null, 123), new BatchIdentity("2019-09-17T01:02:03.123Z", 1, 5, "test.log", 123)); assertNotEquals(new BatchIdentity("2019-09-17T01:02:03.123Z", 1, 5, null, null), new BatchIdentity("2019-09-17T01:02:03.123Z", 1, 5, null, 123)); }