you can see how we do that in the system app, for mock_contact.js for example