Setting the system properties in the environment makes the test risky when running in parallel. It would be better to use the MockEnvironmentVariables class for this.