@Test
public void testListBeans() {

    try {
        admin.list("schemaName", Arrays.asList("c1", "c2"));
        fail("Cannot list unregistered schema");
    } catch (AbortRuntimeException e) {
        // don't know if schema or instances were invalid from
        // a HTTP 404 response, hence CFG090 and not CFG101/CDG304
        assertThat(e.getEvent().getCode(), is(CFG090));
    }
    admin.create(grandfathersBeans);
    Collection<Bean> beans = admin.list(GRANDFATHER_SCHEMA_NAME, Arrays.asList("g1", "g2"));
    assertThat(beans.size(), is(2));
    Collection<Bean> expected = toBeans(g1, g2);
    assertReflectionEquals(expected, beans, LENIENT_ORDER);
}