Replaced dynamic allocation in tests with static allocation