@Test public void testEquals() { ConfiguredConsumeDestination d1 = new ConfiguredConsumeDestination(DEST_NAME, FILTER); ConfiguredConsumeDestination d2 = new ConfiguredConsumeDestination(DEST_NAME, FILTER); ConfiguredConsumeDestination d3 = new ConfiguredConsumeDestination(EMPTY_STRING, FILTER); ConfiguredConsumeDestination d4 = new ConfiguredConsumeDestination(null, FILTER); ConfiguredConsumeDestination d5 = new ConfiguredConsumeDestination(DEST_NAME, EMPTY_STRING); ConfiguredConsumeDestination d6 = new ConfiguredConsumeDestination(DEST_NAME, null); ConfiguredConsumeDestination d7 = new ConfiguredConsumeDestination(null, null); equalityAssertion(new ConfiguredConsumeDestination(), new ConfiguredConsumeDestination(), true); equalityAssertion(d1, d1, true); equalityAssertion(d1, d2, true); equalityAssertion(d2, d1, true); equalityAssertion(d1, d3, false); equalityAssertion(d3, d1, false); equalityAssertion(d1, d4, false); equalityAssertion(d4, d1, false); equalityAssertion(d1, d5, false); equalityAssertion(d5, d1, false); equalityAssertion(d1, d6, false); equalityAssertion(d6, d1, false); equalityAssertion(d1, d7, false); equalityAssertion(d7, d1, false); assertFalse(d1.equals(null)); assertFalse(d1.equals(new Object())); }
@Override public boolean equals(Object obj) { if (obj != null) { if (obj instanceof ConsumeDestination) { ConsumeDestination dest = (ConsumeDestination) obj; int count = 0; count += areEqual(this.getDestination(), dest.getDestination()) ? 1 : 0; count += areEqual(this.getFilterExpression(), dest.getFilterExpression()) ? 1 : 0; return count == 2; } } return false; }
ConfiguredConsumeDestination extends ConsumeDestinationImp { @Override public boolean equals(Object obj) { if (obj != null) { if (obj instanceof ConsumeDestination) { ConsumeDestination dest = (ConsumeDestination) obj; int count = 0; count += areEqual(this.getDestination(), dest.getDestination()) ? 1 : 0; count += areEqual(this.getFilterExpression(), dest.getFilterExpression()) ? 1 : 0; return count == 2; } } return false; } }
ConfiguredConsumeDestination extends ConsumeDestinationImp { @Override public boolean equals(Object obj) { if (obj != null) { if (obj instanceof ConsumeDestination) { ConsumeDestination dest = (ConsumeDestination) obj; int count = 0; count += areEqual(this.getDestination(), dest.getDestination()) ? 1 : 0; count += areEqual(this.getFilterExpression(), dest.getFilterExpression()) ? 1 : 0; return count == 2; } } return false; } ConfiguredConsumeDestination();  ConfiguredConsumeDestination(String dest);  ConfiguredConsumeDestination(String dest, String filter);  ConfiguredConsumeDestination(String dest, String filter, String threadname); }
ConfiguredConsumeDestination extends ConsumeDestinationImp { @Override public boolean equals(Object obj) { if (obj != null) { if (obj instanceof ConsumeDestination) { ConsumeDestination dest = (ConsumeDestination) obj; int count = 0; count += areEqual(this.getDestination(), dest.getDestination()) ? 1 : 0; count += areEqual(this.getFilterExpression(), dest.getFilterExpression()) ? 1 : 0; return count == 2; } } return false; } ConfiguredConsumeDestination();  ConfiguredConsumeDestination(String dest);  ConfiguredConsumeDestination(String dest, String filter);  ConfiguredConsumeDestination(String dest, String filter, String threadname); @Override boolean equals(Object obj); @Override int hashCode(); void setDestination(String s); String getDestination(); void setFilterExpression(String s); String getFilterExpression(); }
ConfiguredConsumeDestination extends ConsumeDestinationImp { @Override public boolean equals(Object obj) { if (obj != null) { if (obj instanceof ConsumeDestination) { ConsumeDestination dest = (ConsumeDestination) obj; int count = 0; count += areEqual(this.getDestination(), dest.getDestination()) ? 1 : 0; count += areEqual(this.getFilterExpression(), dest.getFilterExpression()) ? 1 : 0; return count == 2; } } return false; } ConfiguredConsumeDestination();  ConfiguredConsumeDestination(String dest);  ConfiguredConsumeDestination(String dest, String filter);  ConfiguredConsumeDestination(String dest, String filter, String threadname); @Override boolean equals(Object obj); @Override int hashCode(); void setDestination(String s); String getDestination(); void setFilterExpression(String s); String getFilterExpression();  }