Explore topic-wise MCQs in Junit.

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

1.

____________ Interface objects executes submitted Runnable tasks.

A. Executor
B. Execution
C. Runner
D. RunWith
Answer» B. Execution
2.

___________ is a ThreadingPolicy that makes the Mockery thread-safe and helps tests synchronize with background threads.

A. Blitzer
B. DeterministicExecutor
C. DeterministicScheduler
D. Synchroniser
Answer» E.
3.

______________ is a ScheduledExecutorService that executes commands on the thread that calls runNextPendingCommand, runUntilIdle or tick.

A. Blitzer
B. DeterministicExecutor
C. DeterministicScheduler
D. Synchroniser
Answer» B. DeterministicExecutor
4.

______________ is a class that “blitzes” an object by calling it many times, from multiple threads.

A. Blitzer
B. DeterministicExecutor
C. DeterministicScheduler
D. Synchroniser
Answer» B. DeterministicExecutor
5.

Which package contains interfaces that define jMock’s Domain Specific Embedded Language?

A. org.jmock
B. org.jmock.syntax
C. org.jmock.lib
D. org.jmock.integration.junit3
Answer» C. org.jmock.lib
6.

_______________ contains implementations of the core interfaces that are used to adjust or extend jMock’s basic functionality.

A. org.jmock
B. org.jmock.api
C. org.jmock.lib
D. org.jmock.integration.junit3
Answer» D. org.jmock.integration.junit3
7.

____________IS_A_THREADINGPOLICY_THAT_MAKES_THE_MOCKERY_THREAD-SAFE_AND_HELPS_TESTS_SYNCHRONIZE_WITH_BACKGROUND_THREADS.?$

A. Blitzer
B. DeterministicExecutor
C. DeterministicScheduler
D. Synchroniser
Answer» E.
8.

_____________Interface_objects_executes_submitted_Runnable_tasks.$

A. Executor
B. Execution
C. Runner
D. RunWith
Answer» B. Execution
9.

______________ is a ScheduledExecutorService that executes commands on the thread that calls runNextPendingCommand, runUntilIdle or tick?

A. Blitzer
B. DeterministicExecutor
C. DeterministicScheduler
D. Synchroniser
Answer» B. DeterministicExecutor
10.

____________ Exception is thrown to report that a DeterministicScheduler has been asked to perform a blocking wait, which is not supported.

A. UnsupportedSynchronousOperationException
B. ArrayIndexOutOfBounds
C. StringIndexoutOfBounds
D. Arithmetic
Answer» B. ArrayIndexOutOfBounds
11.

__________ class is an Executor that executes commands on the thread that calls runPendingCommands or runUntilIdle.

A. Blitzer
B. DeterministicExecutor
C. DeterministicScheduler
D. Synchroniser
Answer» C. DeterministicScheduler
12.

______________ is a class that “blitzes” an object by calling it many times, from multiple threads.$

A. Blitzer
B. DeterministicExecutor
C. DeterministicScheduler
D. Synchroniser
Answer» B. DeterministicExecutor
13.

________________ contains classes to help test concurrent code with jMock.

A. org.jmock.concurrent
B. org.jmock.syntax
C. org.jmock.lib
D. org.jmock.integration.junit3
Answer» B. org.jmock.syntax
14.

Which package contains interfaces that define jMock’s Domain Specific Embedded Language?$

A. org.jmock
B. org.jmock.syntax
C. org.jmock.lib
D. org.jmock.integration.junit3
Answer» C. org.jmock.lib
15.

______________ integrates jMock with JUnit 3.

A. org.jmock
B. org.jmock.api
C. org.jmock.lib
D. org.jmock.integration.junit3
Answer» E.
16.

_______________ contains implementations of the core interfaces that are used to adjust or extend jMock’s basic functionality.

A. org.jmock
B. org.jmock.api
C. org.jmock.lib
D. org.jmock.integration.junit3
Answer» D. org.jmock.integration.junit3