Tests: refactor image with helpers