SGF-559 - Add integration tests convering Geode Integrated Security framework configuration using Geode and Apache Shiro methods with SDG's Annotation configuration support.

This commit is contained in:
John Blum
2016-11-02 01:09:11 -07:00
parent 03a94283c2
commit 0dffb938fc
19 changed files with 1062 additions and 176 deletions

View File

@@ -26,6 +26,7 @@ import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.TreeMap;
import org.springframework.util.Assert;
@@ -53,6 +54,7 @@ public abstract class CollectionUtils extends org.springframework.util.Collectio
* @param elements array of objects to add to the {@link Set}.
* @return an unmodifiable {@link Set} containing the elements from the given object array.
*/
@SafeVarargs
public static <T> Set<T> asSet(T... elements) {
Set<T> set = new HashSet<T>(elements.length);
Collections.addAll(set, elements);
@@ -219,4 +221,23 @@ public abstract class CollectionUtils extends org.springframework.util.Collectio
return result;
}
/* (non-Javadoc) */
public static String toString(Map<?, ?> map) {
StringBuilder builder = new StringBuilder("{\n");
int count = 0;
for (Map.Entry<?, ?> entry : new TreeMap<>(map).entrySet()) {
builder.append(++count > 1 ? ",\n" : "");
builder.append("\t");
builder.append(entry.getKey());
builder.append(" = ");
builder.append(entry.getValue());
}
builder.append("\n}");
return builder.toString();
}
}