testCases NullPointer bug fixed