tests: entity test refactoring