### Question:
FlashCapability { public static String toCode(Flash flash) { return CODE_TO_FLASH.reversed().get(flash); }  static Flash toFlash(String code); static String toCode(Flash flash);  }### Answer:
@Test public void toCode() throws Exception { String code = FlashCapability.toCode(Flash.AUTO); assertEquals( Camera.Parameters.FLASH_MODE_AUTO, code ); }