Explore topic-wise MCQs in Junit.

This section includes 2 Mcqs, each offering curated multiple-choice questions to sharpen your Junit knowledge and support exam preparation. Choose a topic below to get started.

1.

_____________ reports an argument matcher.

A. newCapture()
B. makeThreadSafe()
C. reportMatcher(IArgumentMatcher matcher)
D. createNiceMock(Class<T> toMock)
Answer» D. createNiceMock(Class<T> toMock)
2.

______________ create a new capture instance that will keep only the last captured value.

A. newCapture()
B. makeThreadSafe()
C. createNiceControl()
D. createNiceMock(Class<T> toMock)
Answer» B. makeThreadSafe()