create bean by the test instead of using component scan

Component scan will scan the whole package and load all the resources
in the same package, this is often more than we want, so instead of
using the @ComponentScan annotation, we create the resource bean
ourselves.