MongoQueryBuilder implements QueryBuilder<R> { @Override public Class<R> getQueryType() { return clazz; } MongoQueryBuilder(Class<R> clazz, MongoCollection<Document> collection, MorphixMongoConnector connector); @Override MorphixMongoConnector getConnector(); @Override Class<R> getQueryType(); @Override MongoFieldQueryBuilder<R> where(String field); @Override MongoQuerySortBuilder<R> sort(); @Override void delete(); @Override void delete(boolean justOne); @Override QueryResult<R> result(); @Override MongoFindQuery find();  }
@Test void getQueryType() { MongoCollection<Document> collection = this.connector.getDatabase().getCollection("fake_test"); MongoQueryBuilder<Object> query = new MongoQueryBuilder<>(Object.class, collection, this.connector); assertEquals(Object.class, query.getQueryType()); }