Method Calculate User Answers
Fist of all I will recommend you to use Constructor based dependency injection. Then I can not see the relation between the Question, QuestionAnswer, and QuestionRightAnswer entities... currently you are selecting all the right answers from the DB which you should NOT do! You have to get all the correct answers for this question only. Use the question.id from QuestionAnswer just to match the QuestionRightAnswer.questionId FK. Also you do take care of the MULTI_CHOICE questions only, but why?

Consider an implementation such as:

@Service
public class StudentServiceImpl implements StudentService {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    QuestionRepository questionRepository;
    UserRepository userRepository;
    Transformer transformer;

    @Autowired
    public NotificationService(QuestionRepository questionRepository,
                               UserRepository userRepository,
                               Transformer transformer) {
        this.questionRepository = questionRepository;
        this.userRepository = userRepository;
        this.transformer = transformer;
    }

    @Override
    @Transactional
    public void correctAnswer(List&lt;StudentAnswersDTO&gt; questionAnswers) {
        logger.info("****** start correct answers ********");
        Long grade = questionAnswers
            .stream()
            .filter(questionAnswer -&gt; questionAnswer.getType().toLowerCase().equals(AppConstants.MULTI_CHOICE))
            .filter(questionAnswer -&gt; questionRepository
                .getRightAnswersByQuestionId(questionAnswer.getId())
                .stream()
                .anyMatch(rightAnswer -&gt; questionAnswer.getAnswerId().equals(rightAnswer.getAnswerId())))
            .count();

        User currentStudent = userRepository.findByMobileNumber(SecurityHelper.getCurrentUser());
        ((Student) currentStudent).setGrade(grade);
        ((Student) currentStudent).setStudentAnswers(transformer.transform(questionAnswers, AnswerSelected.class));
    }
}