Rework tests to make the environment-independent.