Add test case for magn-5096

This pull request added test cases for [mang-5096 AstFactory method requires null check] (http://adsk-oss.myjetbrains.com/youtrack/issue/MAGN-5096)

@monikaprabhu , test cases added as you request.