Merge change 4608

* changes:
  Restructuring the sample plugin and adding more tests.