UnitTest: Metadata/metadata Extension. 

- writing test code for methods and a scenario to make sure custom fields/values were stored in db
- Bugfix: #5