PropertySources { public static PropertySourceChain fromComputed(Func1<String, String> computation) { return fromComputed(computation, null); }  static PropertySourceChain from(PropertySource source); static PropertySourceChain from(PropertySource source, Func1<String, String> transformer); static PropertySourceChain fromConstantsClass(Class<T> constantsClass); static PropertySourceChain fromConstantsClass(Class<T> constantsClass, Func1<String, String> transformer); static PropertySourceChain fromComputed(Func1<String, String> computation); static PropertySourceChain fromComputed(Func1<String, String> computation, Func1<String, String> transformer); static PropertySourceChain fromEnvironment(); static PropertySourceChain fromEnvironment(Func1<String, String> transformer); static PropertySourceChain fromFile(String path); static PropertySourceChain fromFile(String path, Func1<String, String> transformer); static PropertySourceChain fromImmediate(Action1<ImmediatePropertySource> initializer); static PropertySourceChain fromImmediate(
            Action1<ImmediatePropertySource> initializer,
            Func1<String, String> transformer); static PropertySourceChain fromSystem(); static PropertySourceChain fromSystem(Func1<String, String> transformer);  }
@Test public void computation() { assertEquals("computed", PropertySources.fromComputed(name -> "computed").orFile("test.properties").get("test").get()); assertEquals("value", PropertySources.fromComputed(name -> "test2".equals(name) ? "computed" : null) .orFile("test.properties").get("test").get()); }