Which of the following statements about Spring and unit testing is true? (Select one)
A. Spring provides an internal mock framework so there is no need for a third-party mock framework such as Mockito or EasyMock
B. Spring provides an abstraction to existing Mock frameworks
C. Both a and b
D. Neither a or b
Which of the following statements best describes the benefits of using the Spring Framework with respect to unit testing? (Select one)
A. Your Java code typically has dependencies on Spring Framework classes which are designed to make the job of unit testing easier
B. The Spring Framework encourages you to program to interfaces which makes it easier to stub or mock out dependencies in your code
C. The extensive runtime checks performed by the ApplicationContext when it initializes make traditional unit testing less important
D. All of the above
Which of the following statements about use of the @Transactional annotation in a JUnit integration test is NOT true? (Select one)
A. Annotating a test with @Transactional will cause the test method to run in a transaction
B. Annotating a test class with @Transactional will cause all its test methods to run in transactions
C. Application code that runs in a transaction with REQUIRES_NEW propagation can have those changes rolled back by an @Transactional test
If you annotate one of your classes with @Component, which of the following should you do to have Spring automatically detect your class and load it as a bean? (Select one or several answers)
A. Ensure that you specify a valid bean name in the @Component annotation
B. Ensure that you specify a valid @Scope for the bean
C. Ensure that you have added
D. Ensure that
Which of the following statements is NOT true concerning Setter Injection or Constructor Injection? (Select one)
A. Constructor injection is useful when you must have an instance of a dependency class before your component is used
B. Setter injection is useful if a component can provide its own defaults
C. Using the @Autowired annotation, setter injection also works when the setter method is private
D. Using setters promotes immutability
Which of the following are valid mechanisms of autowiring a dependency when multiple beans match the dependency's type? (Select one or several answers)
A. Use of the @Qualifier and @Autowired annotations together on a field
B. Use of the @Qualifier and @Autowired annotations together with setter methods
C. Use of the @Qualifier annotation solely
Given an ApplicationContext containing multiple bean definitions of a Java type "Foo", which of the following @Autowired scenarios will cause the ApplicationContext to FAIL to initialize? Assume that the ApplicationContext is configured to process the @Autowired annotations. (Select one)
A. @Autowired public void setFoo(Foo aFoo) {}
B. @Autowired private Foo foo;
C. Both a and b
D. Neither a or b
Which of the following statements about the @Autowired annotation is NOT true? (select one)
A. The default behavior is that if a dependency cannot be satisfied with @Autowired, the ApplicationContext will throw a RuntimeException
B. @Autowired is a Spring-specific annotation
C. Multiple arguments can be injected into a single method using @Autowired
D. It cannot be used to annotate fields, only constructors and methods
A. This syntax requires the declaration of the "p" namespace
B. myName is a scalar value (as opposed to a reference to an existing bean)
C. Both a and b
D. Neither a or b
What is true regarding bean definition inheritance?
A. Parent bean definitions should always be abstract
B. Parent bean definitions may be abstract
C. The class attribute can be declared in a parent bean definition
D. It is not useful to declare an id for a parent bean definition
Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only SpringSource exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your CORESPRINGV3.2 exam preparations and SpringSource certification application, do not hesitate to visit our Vcedump.com to find your solutions here.