@Override protected void setup(TestContainer container) { container.enableInterfaceMocking(true); dsMock = mock(DataService.class); when(dsMock.getCurrentUser()).thenReturn(givenUser()); localizerMock = mock(LocalizerServiceLocal.class); when(localizerMock.getLocalizedTextFromDatabase( Mockito.anyString(), Mockito.anyLong(), Mockito.any(LocalizedObjectTypes.class))) .thenReturn(LOCALIZED_RESOURCE); logCollector.localizer = localizerMock; }
@Override protected void setup(TestContainer container) throws Exception { container.addBean(new DataServiceBean()); container.enableInterfaceMocking(true); container.addBean(new ServiceProvisioningPartnerServiceLocalBean()); ds = container.get(DataService.class); localService = container.get(ServiceProvisioningPartnerServiceLocal.class); createOrg(); }