SortOrder { @Override public boolean equals(Object obj) { if (!(obj instanceof SortOrder)) { return false; } if (this == obj) { return true; } SortOrder so = (SortOrder) obj; return new EqualsBuilder().append(field, so.field).isEquals(); } SortOrder(String field);  SortOrder(String field, boolean descending); String getField(); boolean isDescending(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals_1() throws Exception { SortOrder fixture = new SortOrder("", true); Object obj = new Object(); boolean result = fixture.equals(obj); assertEquals(false, result); }
@Test public void testEquals_2() throws Exception { SortOrder fixture = new SortOrder("", true); Object obj = new SortOrder("", true); boolean result = fixture.equals(obj); assertEquals(true, result); }
@Test public void testEquals_3() throws Exception { SortOrder fixture = new SortOrder("", true); Object obj = new SortOrder("", true); boolean result = fixture.equals(obj); assertEquals(true, result); }
@Test public void testEquals_4() throws Exception { SortOrder fixture = new SortOrder("", true); Object obj = new SortOrder("", true); boolean result = fixture.equals(obj); assertEquals(true, result); }