/** @see DATADOC-202 */
  @Test
  public void executeDocumentWithCursorPreparer() {
    template.insert(new Person("Tom"));
    template.insert(new Person("Dick"));
    template.insert(new Person("Harry"));
    final List<String> names = new ArrayList<String>();
    template.executeQuery(
        new Query(),
        template.getCollectionName(Person.class),
        new DocumentCallbackHandler() {
          public void processDocument(DBObject dbObject) {
            String name = (String) dbObject.get("firstName");
            if (name != null) {
              names.add(name);
            }
          }
        },
        new CursorPreparer() {

          public DBCursor prepare(DBCursor cursor) {
            cursor.limit(1);
            return cursor;
          }
        });
    assertEquals(1, names.size());
    // template.remove(new Query(), Person.class);
  }