Sail E0 Webinar


Total Questions : 10
Question 1. Which Hamcrest matcher is just like the && operator?
  1.    Is
  2.    Anything
  3.    sameInstance
  4.    allOf
 Discuss Question
Answer: Option D. -> allOf

Checks to see if all contained matchers match (just like the && operator).

Question 2. AOP forms a basis for __________
  1.    Functional Development
  2.    Object Oriented Programming
  3.    Datafield Development
  4.    Aspect Oriented Software Development
 Discuss Question
Answer: Option D. -> Aspect Oriented Software Development

AOSD seeks modularization of systems.

Question 3. The _________ rule can be used to test both exception type and message.
  1.    Expected
  2.    ExpectedException
  3.    CatchException
  4.    Catch
 Discuss Question
Answer: Option B. -> ExpectedException

Since JUnit 4.7, ExpectedException can be used to test both exception type and message.

Question 4. ______________ Hamcrest matcher can be used to match absolutely everything.
  1.    Is
  2.    AnyOf
  3.    Anything
  4.    Not
 Discuss Question
Answer: Option C. -> Anything

Matches absolutely anything. Useful in some cases where one wants to make the assert statement more readable.

Question 5. In what order is multiple @Before annotated methods run?
  1.    Oldest First
  2.    Newest First
  3.    Randomly
  4.    According to argument list
 Discuss Question
Answer: Option C. -> Randomly

It is not certain which @Before annotated method will run first as all run randomly.

Question 6. To avoid overdesigning an interface, usually ____________ is used.
  1.    Agile Development
  2.    Test Driven Development
  3.    Base Design Development
  4.    Waterfall Development
 Discuss Question
Answer: Option B. -> Test Driven Development

Since test driven development is reliant on a very short development cycle being repeated, it is used to avoid overdesigning an interface.

Question 7. The Timeout Rule implements which interface?
  1.    Timeout
  2.    Test
  3.    TestingTimeout
  4.    TestRule
 Discuss Question
Answer: Option D. -> TestRule

The TestRule interface is extended and implemented by Timeout Rule.

Question 8. Constructor-based DI is accomplished when the container invokes a class constructor with ____________
  1.    A number of arguments
  2.    No argument
  3.    Just one argument
  4.    Null objects
 Discuss Question
Answer: Option A. -> A number of arguments

Each argument represents a dependency on some other class.

Question 9. Timeout testing is ____________
  1.    Software Dependent
  2.    Hardware Dependent
  3.    Software and Hardware Dependent
  4.    Software and Hardware Independent
 Discuss Question
Answer: Option C. -> Software and Hardware Dependent

Since different software and hardware gives different performance, timeout testing is software and hardware dependent.

Question 10. Inversion of Control is used to increase __________ of the code.
  1.    Functionality
  2.    Cleanliness
  3.    Effectiveness
  4.    Modularity
 Discuss Question
Answer: Option D. -> Modularity

Inversion of control makes the code more extensible resulting in more modular code.

Latest Videos

Latest Test Papers