Simplify the test code

Jira Issue: WP-1114