Spring interview questions part 46

Spring interview questions part 46

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. This manages a test context for a test and triggers test execution listeners:-

Correct Answer is : Test context manager

2. This defines a listener interface; by implementing this, you can listen to test execution events.

Correct Answer is : Test execution listener

3. Spring provides convenient TestContext support classes for:-

Correct Answer is : All of the mentioned

4. JUnit 4 allows you to annotate your test methods with:-

Correct Answer is : @Test

5. Usually, a test and its target class are located in the same package, but the source files of tests are stored in a separate directory.

Correct Answer is : TRUE

6. Method to perform cleanup tasks:-

Correct Answer is : all of the mentioned

7. The static assert methods is declared in the:-

Correct Answer is : all of the mentioned

8. Attribute which specifies the exception type:-

Correct Answer is : expected

9. Test data sets are provided by data providers, which are methods with the:-

Correct Answer is : @DataProvider

10. An object that simulates a dependent object:-

Correct Answer is : stub

11. An Object which usually knows how its methods are expected to be called:-

Correct Answer is : mock

12. Libraries that can help create mock objects:-

Correct Answer is : All of the mentioned

13. Test used to test several units in combination as a whole.

Correct Answer is : Integration tests

14. Spring supports web controller testing by providing Servlet API:-

Correct Answer is : All of the mentioned

15. Interface implemented by locale resolver.

Correct Answer is : localeResolver

16. You can define a locale resolver by registering a bean of type LocaleResolver in the web application context.

Correct Answer is : TRUE

17. Default localeResolver used by Spring.

Correct Answer is : AcceptHeaderLocaleResolver

18. AcceptHeaderLocaleResolver esolves locales by inspecting the accept-language header of an HTTP request.

Correct Answer is : TRUE

19. Alternative way to resolve locales.

Correct Answer is : SessionLocaleResolver

20. Property which indicates how many seconds this cookie should be persisted.

Correct Answer is : cookieMaxAge

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon