@Test
public void testExpand() {

    DefaultModelQueryExecutor executor = newExecutor(Book.class);
    // many-to-one
    QueryOptions options = new QueryOptions();
    options.setExpand("author");
    List<Record> records = executor.queryList(options).list;
    assertNotNull(records.get(0).get("author"));
    // many-to-manay
    QueryOptions options2 = new QueryOptions();
    options2.setExpand("tags");
    List<Record> records2 = executor.queryList(options2).list;
    assertNotNull(records2.get(0).get("tags"));
}