public void testGetReaderFormatNames() { Set<String> expectedFormatNames = new HashSet<String>( Arrays.asList(new String[] {"JPG", "jpg", "GIF", "gif", "JPEG", "jpeg", "PNG", "png"})); Set<String> actualFormatNames = new HashSet<String>(Arrays.asList(ImageIO.getReaderFormatNames())); assertTrue(actualFormatNames.containsAll(expectedFormatNames)); }