Updated test for createPattern with null parameter