### Question:
ProblemReport { @Override public boolean equals(Object o) { if (o instanceof ProblemReport) { ProblemReport opr = (ProblemReport) o; return tableId.equals(opr.tableId) && problemType.equals(opr.problemType) && resource.equals(opr.resource); } return false; } ProblemReport(TableId tableId, ProblemType problemType, String resource, String server,
      Throwable e, long creationTime);  ProblemReport(TableId tableId, ProblemType problemType, String resource, String server,
      Throwable e);  ProblemReport(TableId tableId, ProblemType problemType, String resource, Throwable e); private  ProblemReport(TableId table, ProblemType problemType, String resource, byte[] enc); static ProblemReport decodeMetadataEntry(Entry<Key,Value> entry); TableId getTableId(); ProblemType getProblemType(); String getResource(); String getException(); String getServer(); long getTime(); @Override int hashCode(); @Override boolean equals(Object o);  }### Answer:
@Test public void testEquals() { r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null); assertEquals(r, r); ProblemReport r2 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null); assertEquals(r, r2); assertEquals(r2, r); ProblemReport rx1 = new ProblemReport(MetadataTable.ID, ProblemType.FILE_READ, RESOURCE, SERVER, null); assertNotEquals(r, rx1); ProblemReport rx2 = new ProblemReport(TABLE_ID, ProblemType.FILE_WRITE, RESOURCE, SERVER, null); assertNotEquals(r, rx2); ProblemReport rx3 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE + "x", SERVER, null); assertNotEquals(r, rx3); ProblemReport re1 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER + "x", null); assertEquals(r, re1); ProblemReport re2 = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, new IllegalArgumentException("yikes")); assertEquals(r, re2); }
@Test public void testEqualsNull() { r = new ProblemReport(TABLE_ID, ProblemType.FILE_READ, RESOURCE, SERVER, null); assertFalse(r.equals(null)); }