TPSInfo implements Serializable { @Override public boolean equals(Object obj) { if (!(obj instanceof TPSInfo)) { return false; } TPSInfo entity = (TPSInfo) obj; return new EqualsBuilder().append(timestamp, entity.timestamp).append(key, entity.key).isEquals(); } TPSInfo();  TPSInfo(Date timestamp, String key, int transactions, int period); TPSInfo add(TPSInfo toAdd); Date getTimestamp(); String getKey(); int getTransactions(); int getPeriodInSeconds(); int getTPS(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode();  }
@Test public void testEquals_1() throws Exception { TPSInfo fixture = new TPSInfo(new Date(), "", 1, 1); Object obj = new Object(); boolean result = fixture.equals(obj); assertEquals(false, result); }
@Test public void testEquals_2() throws Exception { Date date = new Date(); TPSInfo fixture = new TPSInfo(date, "", 1, 1); Object obj = new TPSInfo(date, "", 1, 1); boolean result = fixture.equals(obj); assertEquals(true, result); }
@Test public void testEquals_3() throws Exception { Date date = new Date(); TPSInfo fixture = new TPSInfo(date, "", 1, 1); Object obj = new TPSInfo(date, "", 1, 1); boolean result = fixture.equals(obj); assertEquals(true, result); }