Improve code coverage for Entity.