Simplify the test code

Jira Issue: WP-1114
Merge pull request #3 from ziransun/master

Simplify test sample code