### Question:
Formats extends Static { public static String[] simplify(String... choices) { if (choices != null) { Arrays.sort(choices, String.CASE_INSENSITIVE_ORDER); int count = 0; for (int i=1; i<choices.length; i++) { final String o1 = choices[i-1]; final String o2 = choices[i]; if (!o1.equalsIgnoreCase(o2)) { choices[count++] = o1; } else if (o1.compareTo(o2) > 0) { choices[i-1] = o2; choices[i] = o1; } } choices = ArraysExt.resize(choices, count); } return choices; } private  Formats(); static void selectImageReader(final Object input, final Locale locale, final ReadCall callback); static ImageReaderSpi getReaderByFormatName(final String format,
            final Class<? extends ImageReaderSpi> exclude); static ImageWriterSpi getWriterByFormatName(final String format,
            final Class<? extends ImageWriterSpi> exclude); static String getDisplayName(final ImageReaderWriterSpi provider); static String[] simplify(String... choices); static void formatDescription(final IIOServiceProvider spi, final Locale locale,
            final StringBuilder appendTo); static ImageInputStream createUncachedImageInputStream(final Object input);  }### Answer:
@Test public void testSimplify() { assertArrayEquals(new String[] { "ascii-grid", "bmp", "gif", "jpeg", "jpeg 2000", "jpeg2000", "jpg", "matrix", "netcdf", "png", "pnm", "raw", "records", "tif", "tiff" }, Formats.simplify( "raw", "tif", "jpeg", "WBMP", "PNM", "JPG", "wbmp", "JPEG", "PNG", "jpeg 2000", "ascii-grid", "tiff", "BMP", "JPEG2000", "RAW", "netcdf", "matrix", "jpeg2000", "GIF", "TIF", "TIFF", "jpg", "bmp", "pnm", "png", "NetCDF", "records", "JPEG 2000", "gif" )); }