Fix bug in test.entity