Add tests of setResource and t methods and modify jsdoc comments