Add tests for Entity