throw if initializing a repository with invalid entity manager
repository UT added