### Question:
ImageParser { public static String getSupportedImageTypes() { String[] readers = ImageIO.getReaderFormatNames(); ArrayList<String> imageArray = new ArrayList<String>(); String str = ""; for (int i = 0; i < readers.length; i++) { String current = readers[i].toLowerCase(); if (!imageArray.contains(current)) { imageArray.add(current); str += current + ","; } } return str.substring(0, str.lastIndexOf(",")); } ImageParser(Document init); static int getImageWidth(String imageLoc); static int getImageHeight(String imageLoc); static String getImageType(String imageLoc); static String getSupportedImageTypes(); static Document parse(URLConnection uc, Element instruction,
            PrintWriter logger); Document parseAsInitialized(URLConnection uc, Element instruction,
            PrintWriter logger); static Document parseBase64(String base64Data, Element instruction); static void main(String[] args);  }### Answer:
@Test public void supportedImageFormats() throws SAXException, IOException { String types = ImageParser.getSupportedImageTypes(); String[] formats = types.split(","); assertTrue("Expected at least 5 supported image types", formats.length >= 5); }