### Question:
Characteristics { public boolean isLegacyDevice() { int hardwareLevel = cameraCharacteristics .get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL); return hardwareLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY; } Characteristics(CameraCharacteristics cameraCharacteristics); boolean isFrontFacingLens(); boolean isFlashAvailable(); boolean isFixedFocusLens(); boolean isLegacyDevice(); int getSensorOrientation(); int[] autoExposureModes(); int[] autoFocusModes(); Set<Size> getJpegOutputSizes(); Set<Size> getSurfaceOutputSizes(); Set<Range<Integer>> getTargetFpsRanges(); Range<Integer> getSensorSensitivityRange();  }### Answer:
@Test public void isLegacyDevice() throws Exception { given(cameraCharacteristics.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL)) .willReturn(CameraMetadata.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY); boolean isLegacyDevice = testee.isLegacyDevice(); assertTrue(isLegacyDevice); }