### Question:
ChannelXmlBean { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; final ChannelXmlBean other = (ChannelXmlBean) obj; if (currentRelease == null) { if (other.currentRelease != null) return false; } else if (!currentRelease.equals(other.currentRelease)) return false; if (name == null) { if (other.name != null) return false; } else if (!name.equals(other.name)) return false; return true; }  String getName(); void setName(String name); ReleaseXmlBean getCurrentRelease(); void setCurrentRelease(ReleaseXmlBean currentRelease); @Override int hashCode(); @Override boolean equals(Object obj); @Override String toString();  }### Answer:
@Test public void testEquals() { ReleaseXmlBean releaseBean1 = new ReleaseXmlBean("snapshot", "Snapshot-20070922_1258"); ReleaseXmlBean releaseBean2 = new ReleaseXmlBean("snapshot", "Snapshot-20070929_1300"); ChannelXmlBean cb1 = new ChannelXmlBean(); cb1.setName("snapshot"); cb1.setCurrentRelease(releaseBean1); ChannelXmlBean cb2 = new ChannelXmlBean(); cb2.setName("snapshot"); cb2.setCurrentRelease(releaseBean1); ChannelXmlBean cb3 = new ChannelXmlBean(); cb3.setName("snapshot"); cb3.setCurrentRelease(releaseBean2); ChannelXmlBean cb4 = new ChannelXmlBean() { private static final long serialVersionUID = 1L; }; new EqualsTester(cb1, cb2, cb3, cb4); }