Add tests for entity managers