### Question:
Request { static CaptureRequest create(CaptureRequestBuilder builder) throws CameraAccessException { return new Request( builder.cameraDevice, builder.requestTemplate, builder.surfaces, builder.shouldTriggerAutoFocus, builder.triggerPrecaptureExposure, builder.cancelPrecaptureExposure, builder.flash, builder.shouldSetExposureMode, builder.focus, builder.previewFpsRange, builder.sensorSensitivity, builder.jpegQuality ) .build(); } private  Request(CameraDevice cameraDevice,
                    int requestTemplate,
                    List<Surface> surfaces,
                    boolean shouldTriggerAutoFocus,
                    boolean triggerPrecaptureExposure,
                    boolean cancelPrecaptureExposure,
                    Flash flash, boolean shouldSetExposureMode,
                    FocusMode focus,
                    Range<Integer> previewFpsRange,
                    Integer sensorSensitivity,
                    Integer jpegQuality);   }### Answer:
@Test public void stillCapture_setCaptureIntent() throws Exception { CaptureRequestBuilder request = simpleRequest(); Request.create(request); verify(builder) .set(CaptureRequest.CONTROL_CAPTURE_INTENT, CameraMetadata.CONTROL_CAPTURE_INTENT_STILL_CAPTURE); verify(builder) .set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_AUTO); }
@Test public void stillCapture_notSetCaptureIntent() throws Exception { CaptureRequestBuilder request = CaptureRequestBuilder .create( cameraDevice, CameraDevice.TEMPLATE_PREVIEW ) .into(surface); Request.create(request); verify(builder, never()) .set(CaptureRequest.CONTROL_CAPTURE_INTENT, CameraMetadata.CONTROL_CAPTURE_INTENT_STILL_CAPTURE); verify(builder, never()) .set(CaptureRequest.CONTROL_MODE, CaptureRequest.CONTROL_MODE_AUTO); }