### Question:
LuceneQuery extends Query { @Override public boolean equals(final Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final LuceneQuery other = (LuceneQuery) obj; if (query == null) { if (other.query != null) { return false; } } else if (!query.equals(other.query)) { return false; } return true; } LuceneQuery(final String query); String getQuery(); @Override void accept(final QueryVisitor visitor); @Override QueryType queryType(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }### Answer:
@Test public void shouldBeEqual_withSameValues() { final String query = Randoms.randomString(); final LuceneQuery luceneQuery = new LuceneQuery(query); final LuceneQuery otherLuceneQuery = new LuceneQuery(query); final boolean equals = luceneQuery.equals(otherLuceneQuery); assertTrue(equals); }