public static TerminateQuery query(final Optional<NodeLocation> location, final QueryId queryId) {
    return new TerminateQuery(location, Optional.of(queryId));
  }
@SuppressWarnings("UnstableApiUsage")
  @Test
  public void shouldImplementHashCodeAndEqualsProperty() {
    new EqualsTester()
        .addEqualityGroup(
            // Note: At the moment location does not take part in equality testing
            TerminateQuery.query(Optional.of(SOME_LOCATION), SOME_QUERY_ID),
            TerminateQuery.query(Optional.of(OTHER_LOCATION), SOME_QUERY_ID)
        )
        .addEqualityGroup(
            TerminateQuery.query(Optional.empty(), new QueryId("diff"))
        )
        .testEquals();
  }