assertThat(cursor.hasNext(), equalTo(false));
}
@Test
public void testArray() {
MockObject o1 = new MockObject("id1", "blah1", 10);
MockObject o2 = new MockObject("id2", "blah2", 20);
MockObject o3 = new MockObject("id3", "blah3", 30);
coll.insert(o1, o2, o3);
List<MockObject> results = coll.find()
.sort(new BasicDBObject("integer", 1)).toArray();
assertThat(results, contains(o1, o2, o3));
assertThat(results, hasSize(3));