FieldSearchParam implements SearchParam { @Override public boolean equals(Object obj) { if (!(obj instanceof FieldSearchParam)) { return false; } if (this == obj) { return true; } FieldSearchParam so = (FieldSearchParam) obj; return new EqualsBuilder().append(fieldName, so.fieldName).append(value, so.value).isEquals(); } FieldSearchParam(String fieldName, String value); String getQuery(); Query getLuceneQuery(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals_1() throws Exception { FieldSearchParam fixture = new FieldSearchParam("", ""); Object obj = new Object(); boolean result = fixture.equals(obj); assertFalse(result); }
@Test public void testEquals_2() throws Exception { FieldSearchParam fixture = new FieldSearchParam("", ""); Object obj = new FieldSearchParam("", ""); boolean result = fixture.equals(obj); assertTrue(result); }
@Test public void testEquals_3() throws Exception { FieldSearchParam fixture = new FieldSearchParam("", ""); Object obj = new FieldSearchParam("", ""); boolean result = fixture.equals(obj); assertTrue(result); }
@Test public void testEquals_4() throws Exception { FieldSearchParam fixture = new FieldSearchParam("", ""); Object obj = new FieldSearchParam("", ""); boolean result = fixture.equals(obj); assertTrue(result); }