We currently have a few environment variable unit tests achieved by Maven profiles due to Junit 4 does not support setting environment variables. Now that we added Junit 5, we should update these tests with Junit 5 features.
See #2724 (comment) for details.