@Before
public void setUp() throws Exception {
createDomainProviderMock(NullDomain.class, "example");
queryInterface = mock(QueryInterface.class);
context.putBean("queryInterface", queryInterface);
DummyModel dummyModel = new DummyModel();
dummyModel.setId("42");
dummyModel.setValue("foo");
when(queryInterface.queryByString(DummyModel.class, "id:42")).thenReturn(Arrays.asList(dummyModel));
when(queryInterface.queryByString(DummyModel.class, "crap")).thenThrow(
new IllegalArgumentException("illegal query"));
ServiceList<ClassProvider> classProviders = super.makeServiceList(ClassProvider.class);
context.putBean("modelProviders", classProviders);