/** @throws java.lang.Exception */ @Before public void setUp() throws Exception { final BusinessObjectModelRepositoryStore store = mock(BusinessObjectModelRepositoryStore.class); when(store.getChildren()).thenReturn(Collections.singletonList(fileStore)); final BusinessObjectData data = aBusinessData() .havingDataType(BusinessObjectDataTypeBuilder.aBusinessObjectDataType()) .build(); final Pool pool = aPool().build(); pool.getData().add(data); wizardPageUnderTest = new BusinessObjectDataWizardPage(pool, data, store, newHashSet("data1"), hintImageProvider); doReturn(realmWithDisplay.createImage()).when(hintImageProvider).getHintImage(); wizardPageUnderTest.setWizard(wizardWithContainer); when(wizardWithContainer.getContainer()).thenReturn(wizardContainer); when(wizardContainer.getShell()).thenReturn(realmWithDisplay.getShell()); }