Add more test for the plugin
Minor improvements. Test function 'publish'