@@ -0,0 +1,830 @@
+package com.github.gabrielruiu.spring.cloud.config.redis;%0A%0Aimport org.springframework.cloud.config.environment.PropertySource;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0A/**%0A * @author Gabriel Mihai Ruiu (gabriel.ruiu@mail.com)%0A */%0Apublic class PropertySourceBuilder %7B%0A%0A    private String name;%0A    private Map%3CString, String%3E propertyMap = new HashMap%3C%3E();%0A%0A    public static PropertySourceBuilder aPropertySource() %7B%0A        return new PropertySourceBuilder();%0A    %7D%0A%0A    public PropertySourceBuilder withName(String name) %7B%0A        this.name = name;%0A        return this;%0A    %7D%0A%0A    public PropertySourceBuilder withProperty(String key, String value) %7B%0A        this.propertyMap.put(key, value);%0A        return this;%0A    %7D%0A%0A    public PropertySource build() %7B%0A        return new PropertySource(name, propertyMap);%0A    %7D%0A%7D%0A

Add builder to help prepare expected instances of PropertySource in tests It's better than doing everything (instantiating the PropertySource along with the Map) inside the test itself, which would occupy much space