}
@Test
public void distinctWithParameterizedQuery() throws Exception {
/* given */
collection.save(new Friend("John", new Coordinate(1, 2)));
collection.save(new Friend("Peter", new Coordinate(3, 4)));
/* when */
Iterator<Coordinate> coordinates = collection.distinct("coordinate").query("{name:#}", "Peter").as(Coordinate.class).iterator();
/* then */
Coordinate first = coordinates.next();
assertThat(first.lat).isEqualTo(3);
assertThat(first.lng).isEqualTo(4);
assertThat(coordinates.hasNext()).isFalse();
}