Copied examples from node.js test/addons