Unit test for saving image