JUnit Questions and Answers – Dependency Management with Ivy

This set of JUnit Multiple Choice Questions & Answers (MCQs) focuses on “Dependency Management with Ivy”.

1. _______________ 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
View Answer

Answer: c
Explanation: The org.jmock.lib package contains implementations of the core interfaces.

2. ______________ integrates jMock with JUnit 3.
a) org.jmock
b) org.jmock.api
c) org.jmock.lib
d) org.jmock.integration.junit3
View Answer

Answer: d
Explanation: org.jmock.integration.junit4 is used to integrate jMock with JUnit 4.

3. 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
View Answer

Answer: b
Explanation: org.jmock.syntax defines interfaces that define jMock’s Domain Specific Embedded Language.
advertisement
advertisement

4. ________________ 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
View Answer

Answer: a
Explanation: The classes defined under org.jmock.concurrent help test concurrent code with jMock.

5. ______________ is a class that “blitzes” an object by calling it many times, from multiple threads.
a) Blitzer
b) DeterministicExecutor
c) DeterministicScheduler
d) Synchroniser
View Answer

Answer: a
Explanation: The Blitzer class calls an object many times from different and multiple threads.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. __________ class is an Executor that executes commands on the thread that calls runPendingCommands or runUntilIdle.
a) Blitzer
b) DeterministicExecutor
c) DeterministicScheduler
d) Synchroniser
View Answer

Answer: b
Explanation: The DeterministicExecutor executes commands on the thread calling runPendingCommands.

7. ____________ 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
View Answer

Answer: a
Explanation: UnsupportedSynchronousOperationException reports that a DeterministicSchedular has been asked to perform a blocking wait.
advertisement

8. ______________ is a ScheduledExecutorService that executes commands on the thread that calls runNextPendingCommand, runUntilIdle or tick.
a) Blitzer
b) DeterministicExecutor
c) DeterministicScheduler
d) Synchroniser
View Answer

Answer: a
Explanation: DeterministicScheduler executes on the thread calling runNextPendingCommand.

9. ___________ is a ThreadingPolicy that makes the Mockery thread-safe and helps tests synchronize with background threads.
a) Blitzer
b) DeterministicExecutor
c) DeterministicScheduler
d) Synchroniser
View Answer

Answer: d
Explanation: The Synchroniser class is used to make mockery thread safe.
advertisement

10. ____________ Interface objects executes submitted Runnable tasks.
a) Executor
b) Execution
c) Runner
d) RunWith
View Answer

Answer: a
Explanation: Executor interface provides a way of decoupling task submission.

Sanfoundry Global Education & Learning Series – JUnit.
To practice all areas of Junit, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.