@BeforeClass(groups = "fast") public void beforeMethod() throws Exception { super.beforeClass(); account = Mockito.mock(Account.class); Mockito.when( accountInternalApi.getAccountByRecordId( Mockito.anyLong(), Mockito.<InternalTenantContext>any())) .thenReturn(account); dateHelper = new EntitlementDateHelper(accountInternalApi, clock); clock.resetDeltaFromReality(); ; }
@Override @BeforeMethod(groups = "fast") public void beforeMethod() throws Exception { super.beforeMethod(); final NonEntityDao nonEntityDao = Mockito.mock(NonEntityDao.class); final EntitlementDao dao = Mockito.mock(EntitlementDao.class); final CatalogService catalogService = new MockCatalogService(new MockCatalog()); final SubscriptionApiService apiService = Mockito.mock(SubscriptionApiService.class); final EntitlementTimelineApi timelineApi = Mockito.mock(EntitlementTimelineApi.class); final InternalCallContextFactory internalCallContextFactory = new InternalCallContextFactory(clock, nonEntityDao, new CacheControllerDispatcher()); transferApi = new DefaultEntitlementTransferApi( clock, dao, timelineApi, catalogService, apiService, internalCallContextFactory); }
@BeforeClass(groups = "fast") protected void beforeClass() throws Exception { super.beforeClass(); bundleId = UUID.randomUUID(); }