@Test void tetGetVariable() { UUID expectedUuid = UUID.fromString("c9fbfbfd-8d54-4cba-958f-25a3f7a14ca7"); Mockito.when(environmentVariablesAccessor.getVariable("ab")) .thenReturn(expectedUuid.toString()); assertEquals(expectedUuid, environment.getVariable("ab", UUID::fromString)); }
public <T> T getVariable(String name, Function<String, T> mappingFunction) { return getVariable(name, mappingFunction, null); }
Environment { public <T> T getVariable(String name, Function<String, T> mappingFunction) { return getVariable(name, mappingFunction, null); } }
Environment { public <T> T getVariable(String name, Function<String, T> mappingFunction) { return getVariable(name, mappingFunction, null); } Environment();  Environment(EnvironmentVariablesAccessor environmentVariablesAccessor); }
Environment { public <T> T getVariable(String name, Function<String, T> mappingFunction) { return getVariable(name, mappingFunction, null); } Environment();  Environment(EnvironmentVariablesAccessor environmentVariablesAccessor); Map<String, String> getAllVariables(); Long getLong(String name); String getString(String name); Integer getInteger(String name); Boolean getBoolean(String name); Long getLong(String name, Long defaultValue); String getString(String name, String defaultValue); Integer getInteger(String name, Integer defaultValue); Boolean getBoolean(String name, Boolean defaultValue); Integer getPositiveInteger(String name, Integer defaultValue); Integer getNegativeInteger(String name, Integer defaultValue); T getVariable(String name, Function<String, T> mappingFunction); T getVariable(String name, Function<String, T> mappingFunction, T defaultValue); boolean hasVariable(String name); }
Environment { public <T> T getVariable(String name, Function<String, T> mappingFunction) { return getVariable(name, mappingFunction, null); } Environment();  Environment(EnvironmentVariablesAccessor environmentVariablesAccessor); Map<String, String> getAllVariables(); Long getLong(String name); String getString(String name); Integer getInteger(String name); Boolean getBoolean(String name); Long getLong(String name, Long defaultValue); String getString(String name, String defaultValue); Integer getInteger(String name, Integer defaultValue); Boolean getBoolean(String name, Boolean defaultValue); Integer getPositiveInteger(String name, Integer defaultValue); Integer getNegativeInteger(String name, Integer defaultValue); T getVariable(String name, Function<String, T> mappingFunction); T getVariable(String name, Function<String, T> mappingFunction, T defaultValue); boolean hasVariable(String name);  }