πŸ§ͺ Maven MCQ Quiz Hub

Maven Mcq Set 3

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

What are exceptions?





βœ… Correct Answer: 1

________ can be useful in adding additional functionality which applies to every test within a test class.





βœ… Correct Answer: 2

______ is a programming paradigm which allows the separation of cross cutting concerns, hence, increasing modularity.





βœ… Correct Answer: 3

_______ describes a class of functions which when run modify other functions.





βœ… Correct Answer: 2

AOP forms a basis for ______





βœ… Correct Answer: 4

Custom JUnit rules can be created using _______





βœ… Correct Answer: 1

With the β€˜expected’ argument, one cannot ________





βœ… Correct Answer: 3

The _________ rule can be used to test both exception type and message.





βœ… Correct Answer: 2

ExpectedException is found under which package?





βœ… Correct Answer: 4

The correct way to initialise an ExpectedException object is _____





βœ… Correct Answer: 3

What is timeout testing?





βœ… Correct Answer: 2

The _____ parameter is used along with the @Test annotation to test for timeouts.





βœ… Correct Answer: 2

@Test(timeout = 130) implies a time limit of ______





βœ… Correct Answer: 1

Timeout testing is _____





βœ… Correct Answer: 3

What applies the same timeout to every test method of a class?





βœ… Correct Answer: 3

A Timeout Rule is initialized by _______





βœ… Correct Answer: 2

Where is the Timeout class present?





βœ… Correct Answer: 1

The Timeout Rule implements which interface?





βœ… Correct Answer: 4

If a timeout which has been specified lapses before the completion of the test, its execution is interrupted with _____





βœ… Correct Answer: 2

What does a specified timeout of 0 imply?





βœ… Correct Answer: 4

______ is a library that contains a lot of helpful matcher objects , ported in several languages.





βœ… Correct Answer: 4

Hamcrest is not a _______ framework in itself.





βœ… Correct Answer: 2

The package for the assertThat() function is?





βœ… Correct Answer: 2

______ Hamcrest matcher can be used to match absolutely everything.





βœ… Correct Answer: 3

______ is used only to improve the readability of the statements.





βœ… Correct Answer: 2

Which Hamcrest matcher is just like the && operator?





βœ… Correct Answer: 4

______ checks to see if any of the contained matchers match.





βœ… Correct Answer: 1

________ traverses the meaning of the contained matchers.





βœ… Correct Answer: 1

The instanceOf matcher is equivalent to ________





βœ… Correct Answer: 1

______ is used to test object identity.





βœ… Correct Answer: 4

The JUnit hasItem() function is a _______





βœ… Correct Answer: 3

The package to which hasItem() function belongs is ________





βœ… Correct Answer: 1

Class JUnitMatchers extends _______





βœ… Correct Answer: 1

_____ is used for combining those matchers which must both pass.





βœ… Correct Answer: 2

_______ Hamcrest matcher tests for null values.





βœ… Correct Answer: 2

______ tests whether a JavaBean has a particular property.





βœ… Correct Answer: 3

To define a ________ in a JavaBean class, public getter and setter methods have to be supplied.





βœ… Correct Answer: 4

A/An __________ property is an array instead of a single value.





βœ… Correct Answer: 1

__________ tests whether a given string equals another one, ignoring the case.





βœ… Correct Answer: 2

_______ tests whether a given Map has a given entry.





βœ… Correct Answer: 4

Which Hamcrest core matcher checks if a number is equal to a number of some acceptable error?





βœ… Correct Answer: 1

assertThat(1.03, is(closeTo(1.0, 0.03))) is _____





βœ… Correct Answer: 1

assertThat(0.03, is(closeTo(1.0, 0.03))) is _____





βœ… Correct Answer: 2

The closeTo function is found under which package?





βœ… Correct Answer: 3

The isCloseTo class extends which base class?





βœ… Correct Answer: 4

The ___________ method of the TypeSafeMatcher class is made final.





βœ… Correct Answer: 1

The TypeSafeMatcher implements the __________ interface.





βœ… Correct Answer: 4

The ____________ matcher checks if a given key is in a map.





βœ… Correct Answer: 3

To write custom matcher _____________ has to be implemented.





βœ… Correct Answer: 2

_______ is the base class for all Matcher implementations.





βœ… Correct Answer: 4