BitmapEncoderRegistry { public static boolean supports(BitmapEncoder encoder, String mime) { for (final String mime1 : encoder.getSupportedMIMETypes()) { if (mime1.equals(mime)) { return true; } } return false; } private  BitmapEncoderRegistry(); static void register(String classname, int priority); static boolean supports(BitmapEncoder encoder, String mime); static boolean supports(String mime); static BitmapEncoder getInstance(String mime); static Set<String> getSupportedMIMETypes();  }
@Test public void testSupports_String() { System.out.println("supports"); String mime = "image/jpeg"; boolean expResult = true; boolean result = BitmapEncoderRegistry.supports(mime); assertEquals(expResult, result); assertEquals(!expResult, BitmapEncoderRegistry.supports("foo/bar")); }