Resolve deprecation warning in test code
Resolve deprecation warning in test code

lady-segfault/image,bvssvni/image,tomaka/image,TyOverby/rust-image,hetzge/image,PistonDevelopers/image,nwin/rust-image,PistonDevelopers/image,JaySon-Huang/image,huonw/image,mbrubeck/image,twoodford/image,dtwood/piston-image,theotherphil/image