### Question:
MongoQueryTranslator extends
        AbstractQueryTranslator<DBObject, DBObject, DBObject> implements
        QueryTranslator<DBObject, DBObject, DBObject> { @Override public DBObject contains(String fieldName, Object[] values) { int n = values.length; if (n == 1) { return eq(fieldName, values[0]); } else { DBObject[] conditions = new DBObject[n]; for (int i = 0; i < n; i++) { conditions[i] = eq(fieldName, values[i]); } return and(conditions); } } MongoQueryTranslator(PropertyResolver propertyResolver); @Override DBObject eq(String fieldName, Object value); @Override DBObject ne(String fieldName, Object value); @Override DBObject lt(String fieldName, Object value); @Override DBObject lte(String fieldName, Object value); @Override DBObject gt(String fieldName, Object value); @Override DBObject gte(String fieldName, Object value); @Override DBObject between(String fieldName, Object from, Object to); @Override DBObject in(String fieldName, Object[] values); @Override DBObject notIn(String fieldName, Object[] values); @Override DBObject contains(String fieldName, Object[] values); @Override DBObject isNull(String fieldName); @Override DBObject notNull(String fieldName); @Override DBObject isEmpty(String fieldName); @Override DBObject notEmpty(String fieldName); @Override DBObject within(String fieldName,
            Point<N> center, Number distance); @Override DBObject and(DBObject... subqueries); @Override DBObject or(DBObject... subqueries); @Override DBObject order(String fieldName, Order o); @Override DBObject order(DBObject... orders); @Override DBObject translateProjection(Query<T, R> query);  }### Answer:
@Test public void contains() { Set<DBObject> objects = set(values.length); for (Object value : values) { objects.add(o(property, value)); } assertEquals(o(MongoOperator.AND, objects), translator.contains(property, values)); }
@Test public void contains_one() { assertEquals(o(property, value), translator.contains(property, new Object[]{ value })); }