}
@Test
public void canPopulateRestrictionForAGivenSubtype() {
AggregateMapper<FakeAggregate> mapper = (AggregateMapper<FakeAggregate>) context.mapperFor(FakeAggregate.class);
Criteria criteria = new Criteria(mock(QueryExecutor.class));
mapper.applyRestrictionsFor(FakeChildAggregate.class, criteria);
DBObject query = criteria.createQuery();
assertThat(query.get("$or"), notNullValue());
BasicDBList or = (BasicDBList) query.get("$or");
assertThat(or.size(), is(1));
}