Class ConfigurationService.EnvironmentVariables

  • Enclosing class:
    ConfigurationService

    public static class ConfigurationService.EnvironmentVariables
    extends java.lang.Object
    Utility class that allows mocking system environment variables retrieval in test classes (as Mockito disallows mocking static methods of System).
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map<java.lang.String,​java.lang.String> get()
      Simple proxy method for System.getenv() that returns an unmodifiable string map view of the current system environment.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EnvironmentVariables

        public EnvironmentVariables()
    • Method Detail

      • get

        public static java.util.Map<java.lang.String,​java.lang.String> get()
        Simple proxy method for System.getenv() that returns an unmodifiable string map view of the current system environment.
        Returns:
        the environment as a map of variable names to values