Which JUnit annotation marks a method as a test?
Practice this question from Quiz: JUnit and Mockito, with options and an explanation.
Question
Which JUnit annotation marks a method as a test?
Option A — Correct answer
@Test
@Test identifies a test method for JUnit.
Option B
@Mock
Option C
@Entity
Option D
@Autowired