added test for wrong pattern throw exceptions