class RegistrationController {

    private ServiceResult<UserResource> createUser(RegistrationForm registrationForm, Long organisationId, Long competitionId) {
        return userRestService.createUser(
                registrationForm.constructUserCreationResource()
                .withOrganisationId(organisationId)
                .withCompetitionId(competitionId)
                .withRole(Role.APPLICANT)
                .build())
                .toServiceResult();
    }

}