test case for DB-4594
Fix parameter name in exception message
New test for DB-4513