class InterviewResponseServiceImpl implements InterviewResponseService {

    @Override
    @Transactional(readOnly = true)
    public ServiceResult<FileEntryResource> findResponse(long applicationId) {
        return findAssignmentByApplicationId(applicationId).andOnSuccess(interviewAssignment ->
                ofNullable(interviewAssignment.getResponse())
                    .map(InterviewAssignmentResponseOutcome::getFileResponse)
                    .map(FileEntry::getId)
                    .map(fileId -> fileEntryService.findOne(fileId))
                    .orElse(serviceSuccess(null)));
    }

}