in src/main/java/org/apache/sling/scripting/sightly/testing/adaptable/impl/ResourceAdapterFactory.java [36:44]
public <AdapterType> AdapterType getAdapter(Object adaptable, Class<AdapterType> type) {
if (type == ResourceAdapterUseObject.class && adaptable instanceof Resource) {
Resource resource = (Resource) adaptable;
ValueMap properties = resource.adaptTo(ValueMap.class);
String title = (String) properties.get("jcr:title");
return (AdapterType) new ResourceAdapterUseObjectImpl(title);
}
return null;
}