@Test public void testSerializationFromInFind() throws Exception { MockObject mockObject = insertMockObjectWithEmbedded(); DBCursor<MockObject> cursor = coll.find(DBQuery.in("object", mockObject.object)); assertThat(cursor.hasNext(), equalTo(true)); assertThat(cursor.next(), equalTo(mockObject)); }
@Test public void testElemMatchNegative() throws Exception { insertMockObjectWithComplexList(); DBCursor<MockObject> cursor = coll.find().elemMatch("complexList", DBQuery.in("value", "foo", "la").size("list", 2)); assertThat(cursor.hasNext(), equalTo(false)); }