Add vaildation and refine tests

- provide [voluptuous](https://github.com/alecthomas/voluptuous) for validation, usage will update in example.
- resolved #13 
- refine tests with mock