Abstracting unit test with generic entity.