changing demo to be driven by testng, fix potential null point issue