XpathProduceDestination implements MessageDrivenDestination { @Override public boolean equals(Object obj) { if (obj == null) return false; if (obj == this) return true; if (obj instanceof XpathProduceDestination) { XpathProduceDestination item = (XpathProduceDestination) obj; return new EqualsBuilder().append(item.getXpath(), this.getXpath()) .append(item.getDefaultDestination(), this.getDefaultDestination()) .append(item.getXmlDocumentFactoryConfig(), this.getXmlDocumentFactoryConfig()) .append(item.getNamespaceContext(), this.getNamespaceContext()).isEquals(); } return false; } XpathProduceDestination();  XpathProduceDestination(String xpath);  XpathProduceDestination(String xpath, String defaultDest); @Override boolean equals(Object obj); @Override int hashCode(); @Override String getDestination(AdaptrisMessage msg); String getXpath(); void setXpath(String s); String getDefaultDestination(); void setDefaultDestination(String s); KeyValuePairSet getNamespaceContext(); void setNamespaceContext(KeyValuePairSet kvps); DocumentBuilderFactoryBuilder getXmlDocumentFactoryConfig(); void setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder xml);  }
@Test public void testEquals() { assertEquals(new XpathProduceDestination(), new XpathProduceDestination()); XpathProduceDestination d1 = new XpathProduceDestination(DEST_XPATH); XpathProduceDestination d2 = new XpathProduceDestination(DEST_XPATH); assertFalse(d1.equals(null)); assertNotSame(new XpathProduceDestination(), d1); assertEquals(d1, d2); assertEquals(d2, d1); XpathProduceDestination d3 = new XpathProduceDestination(DEST_XPATH, DEFAULT_DEST); XpathProduceDestination d4 = new XpathProduceDestination(DEST_XPATH); assertFalse(d3.equals(d4)); assertFalse(d4.equals(d3)); XpathProduceDestination d5 = new XpathProduceDestination(DEST_XPATH_WITH_FUNCTION, DEFAULT_DEST); XpathProduceDestination d6 = new XpathProduceDestination(DEST_XPATH, DEFAULT_DEST); assertFalse(d5.equals(d6)); assertFalse(d6.equals(d5)); XpathProduceDestination d7 = new XpathProduceDestination(DEST_XPATH_WITH_FUNCTION, ""); XpathProduceDestination d8 = new XpathProduceDestination(DEST_XPATH, DEFAULT_DEST); assertFalse(d7.equals(d8)); assertFalse(d8.equals(d7)); assertFalse(new XpathProduceDestination().equals(new Object())); }