#5 added test for bean validation and fixed a concurrent modification issue