/** Check that CreateDtoObject works. */ @Test public void testCreateDomainObject() { context.checking( new Expectations() { { allowing(mockElasticPath).getBean(ContextIdNames.CATEGORY); will(returnValue(new CategoryImpl())); } }); assertNotNull(categoryAdapter.createDomainObject()); }