Unit tests

Added unit tests to get 100% coverage of this plugin.