Fix Null pointer exception of addTesting