OrderByItem { @Override public boolean equals(final Object obj) { if (!(obj instanceof OrderByItem)) { return false; } OrderByItem orderByItem = (OrderByItem) obj; return segment.getOrderDirection() == orderByItem.segment.getOrderDirection() && index == orderByItem.index; }  @Override boolean equals(final Object obj);  }
@Test public void assertEqualsWhenObjIsNull() { assertFalse(new OrderByItem(mock(OrderByItemSegment.class)).equals(null)); }