🧪 ANT MCQ Quiz Hub

ANT Mcq

Choose a topic to test your knowledge and improve your ANT skills

1. Mocks are Trojan horses because they replace real ___________ from the inside, without the calling classes being aware of it.




2. When we’re talking about mock objects, a/an _________ is a feature built into the mock that verifies whether the external class calling this mock has the correct behavior.




3. EasyMock relies heavily on the __________import feature of Java.




4. To use the createMock method of EasyMock we need to import ___________




5. __________ method creates a mock object that implements the given interface, order checking is enabled by default.




6. __________ is used for the creation of a mock object, with the specification of it being of the requested type, which has implementations of the given interface or extends the given class.




7. __________________ creates a mock object, of the requested type and name which are passed, which also has implementations of the given interface or extends the given class.




8. _____________ creates a mock object that implements the given interface with the specification is that order checking is disabled by default.




9. createMock(String name, Class<T> toMock) throws _________________ exception.




10. ________________ creates a mock builder allowing to create a partial mock for the given class or interface.




11. The ____________ interface is used in the creation of partial mocks with EasyMock. a) IMockBuilder<T> b) IMocker<T> c) IBuilder<T>expect(T value) d) MockBuilder<T>




12. ____________ creates a control of the requested type.




13. _____________ returns the expectation setter for the last expected invocation in the current thread.




14. The _______________ interface decides whether an actual argument is accepted.




15. . The __________ interface allows setting expectations for an associated expected invocation.




16. ____________ function expect the last invocation any times.




17. _____________ sets stub behavior for the expected invocation.




18. _______________ expect the last invocation between min and max times.




19. 5. ____________ expect the last invocation a specified number of times.




20. _____________ sets a stub object that will be used for the calculation of the answer for the expected invocation.




21. _______________ sets a stub object implementing the same interface as the mock.




22. ____________ records a call but returns nothing.




23. _____________ expects the last invocation once.




24. ______________ sets a return value that will be returned for the expected invocation.