private void assertMongoDbQuery(String queryString, String expectedMongoDbQuery) {
assertMongoDbQuery( queryString, null, expectedMongoDbQuery );
}
private void assertMongoDbQuery(String queryString, Map<String, Object> namedParameters, String expectedMongoDbQuery) {
MongoDBQueryParsingResult parsingResult = parseQuery( queryString, namedParameters );
assertThat( parsingResult ).isNotNull();
assertThat( parsingResult.getEntityType() ).isSameAs( IndexedEntity.class );
if ( expectedMongoDbQuery == null ) {
assertThat( parsingResult.getQuery() ).isNull();
}
else {
assertThat( parsingResult.getQuery() ).isNotNull();
assertThat( parsingResult.getQuery().toString() ).isEqualTo( expectedMongoDbQuery );
}
}