public GuicyKillbillTestModule(final KillbillConfigSource configSource, final ClockMock clock) { super(configSource); this.clock = clock; internalCallContext = new MutableInternalCallContext(InternalCallContextFactory.INTERNAL_TENANT_RECORD_ID, 1687L, DateTimeZone.UTC, clock.getUTCNow(), UUID.randomUUID(), UUID.randomUUID().toString(), CallOrigin.TEST, UserType.TEST, "Testing", "This is a test", clock.getUTCNow(), clock.getUTCNow()); callContext = new MutableCallContext(internalCallContext); }
public GuicyKillbillTestModule(final KillbillConfigSource configSource, final ClockMock clock) { super(configSource); this.clock = clock; internalCallContext = new MutableInternalCallContext(InternalCallContextFactory.INTERNAL_TENANT_RECORD_ID, 1687L, DateTimeZone.UTC, clock.getUTCNow(), UUID.randomUUID(), UUID.randomUUID().toString(), CallOrigin.TEST, UserType.TEST, "Testing", "This is a test", clock.getUTCNow(), clock.getUTCNow()); callContext = new MutableCallContext(internalCallContext); }
Mockito.when(accountData.getReferenceTime()).thenReturn(utcNow); final MutableCallContext mutableCallContext = new MutableCallContext(internalCallContext);
public Account createAccount(final CallContext callContext) throws AccountApiException { final Account accountData = new MockAccountBuilder().name(UUID.randomUUID().toString().substring(1, 8)) .firstNameLength(6) .email(UUID.randomUUID().toString().substring(1, 8)) .phone(UUID.randomUUID().toString().substring(1, 8)) .migrated(false) .externalKey(UUID.randomUUID().toString().substring(1, 8)) .billingCycleDayLocal(31) .currency(accountCurrency) .paymentMethodId(UUID.randomUUID()) .timeZone(DateTimeZone.UTC) .createdDate(clock.getUTCNow()) .build(); final MutableCallContext mutableCallContext = new MutableCallContext(internalCallContext); final Account account; if (isFastTest()) { account = GuicyKillbillTestSuiteNoDB.createMockAccount(accountData, accountUserApi, accountApi, immutableAccountApi, nonEntityDao, clock, internalCallContextFactory, mutableCallContext, internalCallContext); } else { account = accountUserApi.createAccount(accountData, callContext); } GuicyKillbillTestSuite.refreshCallContext(account.getId(), clock, internalCallContextFactory, mutableCallContext, internalCallContext); return account; }