Header { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (obj == this) { return true; } if (obj.getClass() != getClass()) { return false; } Header o = (Header) obj; return new EqualsBuilder().append(o.getKey(), getKey()) .append(o.getValue(), getValue()).isEquals(); } Header(@Nonnull String key, @Nonnull String value); protected  Header(); String getKey(); void setKey(String key); @XmlTransient String getValue(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testEquals_1() throws Exception { Header fixture = new Header("", ""); Object obj = null; boolean result = fixture.equals(obj); assertEquals(false, result); }
@Test public void testEquals_2() throws Exception { Header fixture = new Header("", ""); Object obj = new Header("", ""); boolean result = fixture.equals(obj); assertEquals(true, result); }
@Test public void testEquals_3() throws Exception { Header fixture = new Header("", ""); Object obj = new Object(); boolean result = fixture.equals(obj); assertEquals(false, result); }
@Test public void testEquals_4() throws Exception { Header fixture = new Header("", ""); Object obj = new Header("", ""); boolean result = fixture.equals(obj); assertEquals(true, result); }
@Test public void testEquals_5() throws Exception { Header fixture = new Header("", ""); Object obj = new Header("", ""); boolean result = fixture.equals(obj); assertEquals(true, result); }