The Baeldung logo
  • The Baeldung Logo
  • Back to Baeldung
  • Pricing
  • Courses
  • Team Courses
    • Login
    • Registration

Learn Mockito – Module 2 Lesson 1 – Quiz

Last updated: July 11, 2025

Written by: komal
  1. Learn Mockito
  2. Lesson 1: Working with Spies and Partial Mocks
  3. Learn Mockito – Module 2 Lesson 1 – Quiz
Time limit: 0

Quiz Summary

0 of 4 Questions completed

Questions:

Information

You have already completed the quiz before. Hence you can not start it again.

Quiz is loading…

You must sign in or sign up to start the quiz.

You must first complete the following:

Results

Quiz complete. Results are being recorded.

Results

0 of 4 Questions answered correctly

Time has elapsed

You have reached 0 of 0 point(s), (0)

Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)

Categories

  1. Not categorized 0%
  1. Review
  2. Answered
  3. Correct
  4. Incorrect
  1. Question 1 of 4
    1. Question

    What is the key difference between a mock and a spy in Mockito?

    Correct
    Incorrect
  2. Question 2 of 4
    2. Question

    Which annotation is used to create a spy in Mockito?

    Correct
    Incorrect
  3. Question 3 of 4
    3. Question

    Which annotation lets Mockito inject a spy into another object that is also created automatically by Mockito?

    Correct
    Incorrect
  4. Question 4 of 4
    4. Question

    Using the static spy() method, which statement correctly creates a spy of an existing repository instance named realRepo?

    Correct
    Incorrect
The Baeldung logo

Courses

  • Baeldung All Access
  • Individual Courses
  • Baeldung All Team Access
  • Login Course Platform

Pro

  • Pro Team Package
  • FAQ

About

  • About Baeldung
  • The Full Archive
  • Editors
  • Our Partners
  • Partner with Baeldung
  • eBooks
  • FAQ
  • Baeldung Pro
  • Terms of Service
  • Privacy Policy
  • Company Info
  • Contact
The Baeldung Logo