Updated tests for image apis
Small amount of test refactoring