### Question:
DENOPTIMEdge implements Serializable { public boolean sameAs(DENOPTIMEdge other, StringBuilder reason) { if (this.getSourceDAP() != other.getSourceDAP()) { reason.append("Different source atom ("+this.getSourceDAP()+":" +other.getSourceDAP()+"); "); return false; } if (this.getTargetDAP() != other.getTargetDAP()) { reason.append("Different target atom ("+this.getTargetDAP()+":" +other.getTargetDAP()+"); "); return false; } if (!this.getSourceReaction().equals(other.getSourceReaction())) { reason.append("Different source APClass (" +this.getSourceReaction()+":" +other.getSourceReaction()+"); "); return false; } if (!this.getTargetReaction().equals(other.getTargetReaction())) { reason.append("Different target APClass (" +this.getTargetReaction()+":" +other.getTargetReaction()+"); "); return false; } if (this.getBondType() != (other.getBondType())) { reason.append("Different bond type ("+this.getBondType()+":" +other.getBondType()+"); "); return false; } return true; } DENOPTIMEdge(int m_src, int m_trg, int m_srcDAP, int m_trgDAP, 
                                                                    int m_btype); void setSourceVertex(int m_src); void setSourceDAP(int m_srcDAP); void setTargetDAP(int m_trgDAP); void setTargetVertex(int m_trg); void setBondType(int m_btype); int getSourceVertex(); int getSourceDAP(); int getTargetDAP(); int getTargetVertex(); String getSourceReaction(); String getTargetReaction(); void setSourceReaction(String m_rcn); void setTargetReaction(String m_rcn); int getBondType(); boolean sameAs(DENOPTIMEdge other, StringBuilder reason); @Override String toString();  }### Answer:
@Test public void testSameAs_Equal() throws Exception { DENOPTIMEdge eA = new DENOPTIMEdge(0, 1, 0, 0, 1); DENOPTIMEdge eB = new DENOPTIMEdge(0, 1, 0, 0, 1); assertTrue(eA.sameAs(eB, reason)); }
@Test public void testSameAs_DiffAtm() throws Exception { DENOPTIMEdge eA = new DENOPTIMEdge(0, 1, 0, 0, 1); DENOPTIMEdge eB = new DENOPTIMEdge(0, 1, 1, 0, 1); DENOPTIMEdge eC = new DENOPTIMEdge(0, 1, 0, 1, 1); assertFalse(eA.sameAs(eB, reason)); assertFalse(eA.sameAs(eC, reason)); }
@Test public void testSameAs_DiffBndTyp() throws Exception { DENOPTIMEdge eA = new DENOPTIMEdge(0, 1, 0, 0, 1); DENOPTIMEdge eB = new DENOPTIMEdge(0, 1, 0, 0, 2); assertFalse(eA.sameAs(eB, reason)); }