private Properties copyOf(Properties source) {
        Properties copy = new Properties();
        copy.putAll(source);
        return copy;
    }
Wrapper that will restore System properties after test methods.
<p>
Based on: <a href="https://github.com/stefanbirkner/system-rules/blob/master/src/main/java/org/junit/contrib/java/lang/system/RestoreSystemProperties.java">...</a>
web/src/test/java/org/apache/shiro/web/RestoreSystemProperties.java