@SuppressWarnings("unchecked") public OverdueWrapper createOverdueWrapperFor(final Account blockable) throws OverdueException { return (OverdueWrapper) new OverdueWrapper(blockable, api, getOverdueStateSet(), clock, billingStateCalculator, overdueStateApplicator); }
@SuppressWarnings("unchecked") public OverdueWrapper createOverdueWrapperFor(final UUID id, final InternalTenantContext context) throws OverdueException { try { Account account = accountApi.getAccountById(id, context); return new OverdueWrapper(account, api, getOverdueStateSet(), clock, billingStateCalculator, overdueStateApplicator); } catch (AccountApiException e) { throw new OverdueException(e); } }