in src/main/java/org/apache/sling/commons/testing/sling/MockResource.java [75:90]
public <AdapterType> AdapterType adaptTo(Class<AdapterType> type) {
if (type == ValueMap.class) {
ValueMap map = new ValueMapDecorator(new HashMap<String, Object>());
if (resourceType != null) {
map.put("resourceType", resourceType);
}
if (resourceSuperType != null) {
map.put("resourceSuperType", resourceSuperType);
}
for (String key : this.properties.keySet()) {
map.put(key,this.properties.get(key));
}
return (AdapterType) map;
}
throw new UnsupportedOperationException("AdaptTo " + type.getSimpleName() + " not implemented");
}