private Account createAccount(CreateAccountForm createAccountForm, String profileId) {
   Account account = new Account();
   account.setProfileId(profileId);
   account.setType(createAccountForm.getAccountType());
   account.setCreatedBy(
       createAccountForm.getStaffFirstName() + " " + createAccountForm.getStaffLastName());
   account.setCreatedDate(new Date());
   account.setTenantId(createAccountForm.getTenantId());
   return account;
 }
 private User createUser(CreateAccountForm createAccountForm, String profileId) {
   User user = new User();
   user.setUserId(createAccountForm.getUserName());
   user.setProfileId(profileId);
   user.setTenantId(createAccountForm.getTenantId());
   user.setCreatedBy(
       createAccountForm.getStaffFirstName() + " " + createAccountForm.getStaffLastName());
   user.setCreatedDate(new Date());
   Role role = new Role();
   role.setPrimary(CUSTOMER_ROLE);
   user.setRole(role);
   return user;
 }
 private Profile createProfile(CreateAccountForm createAccountForm) {
   Profile profile = new Profile();
   profile.setFirstName(createAccountForm.getFirstName());
   profile.setLastName(createAccountForm.getLastName());
   profile.setDateOfBirth(AppUtil.getDateFromStr(createAccountForm.getDateOfBirth()));
   profile.setAddress(createAccountForm.getAddress());
   profile.setEmailAddress(createAccountForm.getEmailAddress());
   profile.setPhone(createAccountForm.getPhoneNo());
   profile.setTenantId(createAccountForm.getTenantId());
   profile.setSex(createAccountForm.getSex());
   profile.setCreatedBy(
       createAccountForm.getStaffFirstName() + " " + createAccountForm.getStaffLastName());
   profile.setCreatedDate(new Date());
   return profile;
 }