Fix test to not depend on implementation details.