[#1931] now as a real function
[#1933] add test class for deferred resource