This commit refactored the function NewNode to take a *testing.T so that the unexpected error is checked inside it. The caller is now free from checking the errors.