Corrected many warning messages appearing in unit tests