Improved unit test of BeanField and fixed BeanField