How to Mock System.getenv (or Static Methods) In Java with Depedency Injection?
Usually, In Java, you can use @RunWith(PowerMockRunner.class) with its mockStatic method if you really want to mock the System.getenv method because it is a static. But usually this is …