class InterviewApplicationFeedbackServiceImpl implements InterviewApplicationFeedbackService {

    @Override
    @Transactional(readOnly = true)
    public ServiceResult<FileEntryResource> findFeedback(long applicationId) {
        return findAssignmentByApplicationId(applicationId).andOnSuccess(interviewAssignment ->
                ofNullable(interviewAssignment.getMessage())
                    .map(InterviewAssignmentMessageOutcome::getFeedback)
                    .map(FileEntry::getId)
                    .map(fileEntryService::findOne)
                    .orElse(ServiceResult.serviceSuccess(null)));
    }

}