### Question:
SeResponse implements Serializable { @Override public boolean equals(Object o) { if (o == this) { return true; } if (!(o instanceof SeResponse)) { return false; } SeResponse seResponse = (SeResponse) o; return seResponse.getSelectionStatus().equals(selectionStatus) && (seResponse.getApduResponses() == null ? apduResponses == null : seResponse.getApduResponses().equals(apduResponses)) && seResponse.isLogicalChannelOpen() == logicalChannelIsOpen && seResponse.wasChannelPreviouslyOpen() == channelPreviouslyOpen; } SeResponse(boolean logicalChannelIsOpen, boolean channelPreviouslyOpen,
            SelectionStatus selectionStatus, List<ApduResponse> apduResponses); boolean wasChannelPreviouslyOpen(); boolean isLogicalChannelOpen(); SelectionStatus getSelectionStatus(); List<ApduResponse> getApduResponses(); @Override String toString(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test() public void testEquals() throws Exception { Assert.assertTrue(getASeResponse().equals(getASeResponse())); }
@Test() public void testThisEquals() throws Exception { SeResponse resp = getASeResponse(); Assert.assertTrue(resp.equals(resp)); }
@Test() public void testNotEquals() throws Exception { SeResponse resp = getASeResponse(); Object any = new Object(); Assert.assertFalse(resp.equals(any)); }
@Test() public void testNotEqualsNull() throws Exception { SeResponse resp = getASeResponse(); SeResponse respNull = new SeResponse(true, true, new SelectionStatus(null, ApduResponseTest.getAFCI(), true), null); SeResponse respNull2 = new SeResponse(true, true, new SelectionStatus(ApduResponseTest.getAAtr(), null, true), null); SeResponse respNull3 = new SeResponse(true, true, new SelectionStatus(ApduResponseTest.getAAtr(), ApduResponseTest.getAFCI(), true), null); Assert.assertFalse(resp.equals(respNull)); Assert.assertFalse(resp.equals(respNull2)); Assert.assertFalse(resp.equals(respNull3)); }