CameraParametersHelper { static boolean isUsingFocusMode(@NonNull String focusMode, @NonNull Camera camera) { return camera.getParameters().getFocusMode().equals(focusMode); } private  CameraParametersHelper();   }
@Test public void should_verifyThatFocusMode_isUsed() { when(mParameters.getFocusMode()).thenReturn(Camera.Parameters.FOCUS_MODE_AUTO); boolean isUsed = CameraParametersHelper.isUsingFocusMode( Camera.Parameters.FOCUS_MODE_AUTO, mCamera); assertThat(isUsed).isTrue(); }
@Test public void should_verifyThatFocusMode_isNotUsed() { when(mParameters.getFocusMode()).thenReturn(Camera.Parameters.FOCUS_MODE_AUTO); boolean isUsed = CameraParametersHelper.isUsingFocusMode( Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE, mCamera); assertThat(isUsed).isFalse(); }