Free CoreSpringV3.2 Exam Braindumps (page: 8)

Page 7 of 25

Which of the following statements about use of the @Transactional annotation in a JUnit integration test is NOT true? (Select one)

  1. Annotating a test with @Transactional will cause the test method to run in a transaction
  2. Annotating a test class with @Transactional will cause all its test methods to run in transactions
  3. Application code that runs in a transaction with REQUIRES_NEW propagation can have those changes rolled back by an @Transactional test

Answer(s): C



Which of the following statements best describes the benefits of using the Spring Framework with respect to unit testing? (Select one)

  1. Your Java code typically has dependencies on Spring Framework classes which are designed to make the job of unit testing easier
  2. The Spring Framework encourages you to program to interfaces which makes it easier to stub or mock out dependencies in your code
  3. The extensive runtime checks performed by the ApplicationContext when it initializes make traditional unit testing less important
  4. All of the above

Answer(s): B



Which of the following statements about Spring and unit testing is true? (Select one)

  1. Spring provides an internal mock framework so there is no need for a third-party mock framework such as Mockito or EasyMock
  2. Spring provides an abstraction to existing Mock frameworks
  3. Both a and b
  4. Neither a or b

Answer(s): D



Which of the following statements about Spring's JUnit integration testing support is true? (select one)

  1. A new ApplicationContext is initialized and created for each test method
  2. To obtain references to the Spring bean(s) you want to test, you need to call getBean() on the ApplicationContext provided
  3. You can indicate which XML configuration files the test class will use to create the
    ApplicationContext
  4. All of the above

Answer(s): C






Post your Comments and Discuss SpringSource CoreSpringV3.2 exam with other Community members:

CoreSpringV3.2 Exam Discussions & Posts