### Question:
InitialParametersProvider { public Parameters initialParameters() { Capabilities capabilities = capabilitiesOperator.getCapabilities(); Parameters parameters = combineParameters(asList( pictureSizeParameters(capabilities), previewSizeParameters(capabilities), focusModeParameters(capabilities), flashModeParameters(capabilities), previewFpsRange(capabilities), sensorSensitivity(capabilities), jpegQuality() )); parametersValidator.validate(parameters); return parameters; } InitialParametersProvider(CapabilitiesOperator capabilitiesOperator,
                                     SelectorFunction<Collection<Size>, Size> photoSizeSelector,
                                     SelectorFunction<Collection<Size>, Size> previewSizeSelector,
                                     SelectorFunction<Collection<FocusMode>, FocusMode> focusModeSelector,
                                     SelectorFunction<Collection<Flash>, Flash> flashSelector,
                                     SelectorFunction<Collection<Range<Integer>>, Range<Integer>> previewFpsRangeSelector,
                                     SelectorFunction<Range<Integer>, Integer> sensorSensitivitySelector,
                                     Integer jpegQuality,
                                     InitialParametersValidator parametersValidator); Parameters initialParameters();  }### Answer:
@Test public void initialParameters() throws Exception { given(capabilitiesOperator.getCapabilities()) .willReturn(new Capabilities( asSet(PHOTO_SIZE), ALL_PREVIEW_SIZES, asSet(FocusMode.AUTO), asSet(Flash.TORCH), PREVIEW_FPS_RANGES, SENSOR_SENSITIVITY_RANGE, true )); InitialParametersProvider testee = new InitialParametersProvider( capabilitiesOperator, SizeSelectors.biggestSize(), SizeSelectors.biggestSize(), autoFocus(), torch(), PreviewFpsRangeSelectors.rangeWithHighestFps(), SensorSensitivitySelectors.highestSensorSensitivity(), 95, initialParametersValidator ); Parameters parameters = testee.initialParameters(); assertEquals( new Parameters() .putValue( Parameters.Type.PICTURE_SIZE, PHOTO_SIZE ) .putValue( Parameters.Type.PREVIEW_SIZE, PREVIEW_SIZE ) .putValue( Parameters.Type.FOCUS_MODE, FocusMode.AUTO ) .putValue( Parameters.Type.FLASH, Flash.TORCH ) .putValue( Parameters.Type.PREVIEW_FPS_RANGE, PREVIEW_FPS_RANGE ) .putValue( Parameters.Type.SENSOR_SENSITIVITY, SENSOR_SENSITIVITY ) .putValue( Parameters.Type.JPEG_QUALITY, JPEG_QUALITY ), parameters ); verify(initialParametersValidator).validate(parameters); }