Unit tests for plugins. #529 #556