The easier approach would be to construct an Img instance yourself - the test would be much simpler that way.