Fixed matching when strings contain spaces

Jira-issue: WP-1124
Added scenarios related tests

Jira-issue: WP-1124
Added scenarios descriptions

Jira-issue: WP-1124