class EventRegistrationService {

    public Registration getByEventIdAndRegistrationId(String eventId, String registrationId)
            throws EntityMismatchException, EntityNotFoundException {
        Event event = eventEntityService.getById(eventId);
        Registration registration = registrationEntityService.getById(registrationId);
        if (!registration.getEvent().getId().equals(event.getId())) {
            throw new EntityMismatchException();
        }
        return registration;
    }

    @Inject public  EventRegistrationService(
            EventEntityService eventEntityService,
            RegistrationEntityService registrationEntityService
    );

}