Convert TestGetImagesJSON into several unit tests

Docker-DCO-1.1-Signed-off-by: Guilherme Salgado <gsalgado@gmail.com> (github: gsalgado)
Merge pull request #6813 from gsalgado/convert-testgetimagesjson

Convert TestGetImagesJSON into several unit tests