Added some more test cases for entity manager