Added test for Wildcard
Corrected method for getting final state name