### Question:
ParametersConverter { public CameraParametersDecorator toPlatformParameters(Parameters parameters, CameraParametersDecorator output) { for (Parameters.Type storedType : parameters.storedTypes()) { applyParameter( storedType, parameters, output ); } return output; }  CameraParametersDecorator toPlatformParameters(Parameters parameters,
                                                          CameraParametersDecorator output); Parameters fromPlatformParameters(CameraParametersDecorator platformParameters);  }### Answer:
@Test public void returnSameValue() throws Exception { Parameters input = new Parameters(); CameraParametersDecorator result = testee.toPlatformParameters( input, outputParameters ); assertSame( result, outputParameters ); }
@Test public void setFocusMode() throws Exception { Parameters input = new Parameters(); input.putValue( Parameters.Type.FOCUS_MODE, FocusMode.AUTO ); testee.toPlatformParameters( input, outputParameters ); verify(outputParameters).setFocusMode(Camera.Parameters.FOCUS_MODE_AUTO); }
@Test public void setFlash() throws Exception { Parameters input = new Parameters(); input.putValue( Parameters.Type.FLASH, Flash.TORCH ); testee.toPlatformParameters( input, outputParameters ); verify(outputParameters).setFlashMode(Camera.Parameters.FLASH_MODE_TORCH); }
@Test public void setPictureSize() throws Exception { Parameters input = new Parameters(); input.putValue( Parameters.Type.PICTURE_SIZE, new Size(10, 20) ); testee.toPlatformParameters( input, outputParameters ); verify(outputParameters).setPictureSize(10, 20); }
@Test public void setPreviewSize() throws Exception { Parameters input = new Parameters(); input.putValue( Parameters.Type.PREVIEW_SIZE, new Size(10, 20) ); testee.toPlatformParameters( input, outputParameters ); verify(outputParameters).setPreviewSize(10, 20); }