Advanced concepts

@InjectMocks annotation

This is a preview lesson
Register or sign in to take this lesson.

@InjectMocks annotation

What will students be able to do at the end of this section?

In this lesson you will learn you will learn how to annotate the CUT (Class Under Test) with the “@InjectMocks” annotation to avoid boiler plate code when passing in mocks to the CUT