implemented tests for hasSubsequence