### Question:
ParametersFactory { public static Parameters selectFlashMode(@NonNull Capabilities capabilities, @NonNull SelectorFunction<Collection<Flash>, Flash> selector) { return new Parameters().putValue( Parameters.Type.FLASH, selector.select( capabilities.supportedFlashModes() ) ); }  static Parameters selectPictureSize(@NonNull Capabilities capabilities,
                                               @NonNull SelectorFunction<Collection<Size>, Size> selector); static Parameters selectPreviewSize(@NonNull Capabilities capabilities,
                                               @NonNull SelectorFunction<Collection<Size>, Size> selector); static Parameters selectFocusMode(@NonNull Capabilities capabilities,
                                             @NonNull SelectorFunction<Collection<FocusMode>, FocusMode> selector); static Parameters selectFlashMode(@NonNull Capabilities capabilities,
                                             @NonNull SelectorFunction<Collection<Flash>, Flash> selector); static Parameters selectPreviewFpsRange(@NonNull Capabilities capabilities,
                                                   @NonNull SelectorFunction<Collection<Range<Integer>>, Range<Integer>> selector); static Parameters selectSensorSensitivity(@NonNull Capabilities capabilities,
                                                     @NonNull SelectorFunction<Range<Integer>, Integer> selector); static Parameters selectJpegQuality(@NonNull Integer jpegQuality);  }### Answer:
@Test public void selectFlashMode() throws Exception { Flash flash = Flash.AUTO; Parameters result = ParametersFactory.selectFlashMode(CAPABILITIES, selectFromCollection(flash)); assertEquals( new Parameters().putValue(Parameters.Type.FLASH, flash), result ); }