Add unit tests for ImageParser.