diff --git a/tests/camera3/camera3test_fixtures.h b/tests/camera3/camera3test_fixtures.h
index e25880d..81d1997 100644
--- a/tests/camera3/camera3test_fixtures.h
+++ b/tests/camera3/camera3test_fixtures.h
@@ -26,12 +26,12 @@
 static const int kMmaxCams = 2;
 static const uint16_t kVersion3_0 = HARDWARE_MODULE_API_VERSION(3, 0);
 
-class Camera3Test : public testing::Test {
+class Camera3Module : public testing::Test {
  public:
-    Camera3Test() :
+    Camera3Module() :
         num_cams_(0),
         cam_module_(NULL) {}
-    ~Camera3Test() {}
+    ~Camera3Module() {}
  protected:
     virtual void SetUp() {
         const hw_module_t *hw_module = NULL;
@@ -52,6 +52,31 @@
     const camera_module_t *cam_module_;
 };
 
+class Camera3Device : public Camera3Module {
+ public:
+    Camera3Device() :
+        cam_device_(NULL) {}
+    ~Camera3Device() {}
+ protected:
+    virtual void SetUp() {
+        Camera3Module::SetUp();
+        hw_device_t *device = NULL;
+        ASSERT_TRUE(NULL != cam_module()->common.methods->open)
+                    << "Camera open() is unimplemented";
+        ASSERT_EQ(0, cam_module()->common.methods->open(
+            (const hw_module_t*)cam_module(), "0", &device))
+                << "Can't open camera device";
+        ASSERT_TRUE(NULL != device)
+                    << "Camera open() returned a NULL device";
+        ASSERT_EQ(kVersion3_0, device->version)
+                    << "The device does not support HAL3";
+        cam_device_ = reinterpret_cast<camera3_device_t*>(device);
+    }
+    camera3_device_t* cam_device() { return cam_device_; }
+ private:
+    camera3_device *cam_device_;
+};
+
 }  // namespace tests
 
 #endif  // __ANDROID_HAL_CAMERA3_TEST_COMMON__
diff --git a/tests/camera3/camera3tests.cpp b/tests/camera3/camera3tests.cpp
index 9585483..5dbe588 100644
--- a/tests/camera3/camera3tests.cpp
+++ b/tests/camera3/camera3tests.cpp
@@ -19,12 +19,12 @@
 
 namespace tests {
 
-TEST_F(Camera3Test, NumberOfCameras) {
+TEST_F(Camera3Module, NumberOfCameras) {
     ASSERT_LT(0, num_cams()) << "No cameras found";
     ASSERT_GE(kMmaxCams, num_cams()) << "Too many cameras found";
 }
 
-TEST_F(Camera3Test, IsActiveArraySizeSubsetPixelArraySize) {
+TEST_F(Camera3Module, IsActiveArraySizeSubsetPixelArraySize) {
     for (int i = 0; i < num_cams(); ++i) {
         ASSERT_TRUE(NULL != cam_module()->get_camera_info)
             << "get_camera_info is not implemented";
@@ -55,4 +55,17 @@
     }
 }
 
+TEST_F(Camera3Device, DefaultSettingsStillCaptureHasAndroidControlMode) {
+    ASSERT_TRUE(NULL != cam_device()->ops) << "Camera device ops are NULL";
+    const camera_metadata_t *default_settings =
+        cam_device()->ops->construct_default_request_settings(cam_device(),
+            CAMERA3_TEMPLATE_STILL_CAPTURE);
+    ASSERT_TRUE(NULL != default_settings) << "Camera default settings are NULL";
+    camera_metadata_entry entry;
+    ASSERT_EQ(0, find_camera_metadata_entry(
+                const_cast<camera_metadata_t*>(default_settings),
+                ANDROID_CONTROL_MODE, &entry))
+                    << "Can't find ANDROID_CONTROL_MODE in default settings.";
+}
+
 }  // namespace tests
