Unit test for image resizing