add BeanFactory test case