diff --git a/tests/tests/bluetooth/src/android/bluetooth/cts/BluetoothHapClientTest.java b/tests/tests/bluetooth/src/android/bluetooth/cts/BluetoothHapClientTest.java
index f4d6c3b..a79c299 100644
--- a/tests/tests/bluetooth/src/android/bluetooth/cts/BluetoothHapClientTest.java
+++ b/tests/tests/bluetooth/src/android/bluetooth/cts/BluetoothHapClientTest.java
@@ -139,21 +139,6 @@
                 mBluetoothHapClient.getConnectionState(testDevice));
     }
 
-    public void testGetHapGroup() {
-        if (!(mHasBluetooth && mIsHapClientSupported)) return;
-
-        assertTrue(waitForProfileConnect());
-        assertNotNull(mBluetoothHapClient);
-
-        BluetoothDevice testDevice = mAdapter.getRemoteDevice("00:11:22:AA:BB:CC");
-
-        assertTrue(BTAdapterUtils.disableAdapter(mAdapter, mContext));
-
-        // Verify returns BluetoothHapClient.HAP_GROUP_UNAVAILABLE if bluetooth is not enabled
-        assertEquals(BluetoothHapClient.HAP_GROUP_UNAVAILABLE,
-                mBluetoothHapClient.getHapGroup(testDevice));
-    }
-
     public void testGetActivePresetIndex() {
         if (!(mHasBluetooth && mIsHapClientSupported)) return;
 
@@ -164,8 +149,8 @@
 
         assertTrue(BTAdapterUtils.disableAdapter(mAdapter, mContext));
 
-        // Verify returns false if bluetooth is not enabled
-        mBluetoothHapClient.getActivePresetIndex(testDevice);
+        // Verify returns null if bluetooth is not enabled
+        assertNull(mBluetoothHapClient.getActivePresetInfo(testDevice));
     }
 
     public void testSelectActivePreset() {
@@ -188,8 +173,6 @@
         assertTrue(waitForProfileConnect());
         assertNotNull(mBluetoothHapClient);
 
-        BluetoothDevice testDevice = mAdapter.getRemoteDevice("00:11:22:AA:BB:CC");
-
         assertTrue(BTAdapterUtils.disableAdapter(mAdapter, mContext));
 
         // Verify returns false if bluetooth is not enabled
@@ -206,8 +189,8 @@
 
         assertTrue(BTAdapterUtils.disableAdapter(mAdapter, mContext));
 
-        // Verify returns false if bluetooth is not enabled
-        mBluetoothHapClient.getPresetInfo(testDevice, 1);
+        // Verify returns empty list if bluetooth is not enabled
+        assertTrue(mBluetoothHapClient.getAllPresetInfo(testDevice).isEmpty());
     }
 
     public void testGetAllPresetsInfo() {
@@ -224,20 +207,6 @@
         mBluetoothHapClient.getAllPresetInfo(testDevice);
     }
 
-    public void testGetFeatures() {
-        if (!(mHasBluetooth && mIsHapClientSupported)) return;
-
-        assertTrue(waitForProfileConnect());
-        assertNotNull(mBluetoothHapClient);
-
-        BluetoothDevice testDevice = mAdapter.getRemoteDevice("00:11:22:AA:BB:CC");
-
-        assertTrue(BTAdapterUtils.disableAdapter(mAdapter, mContext));
-
-        // Verify returns false if bluetooth is not enabled
-        assertFalse(mBluetoothHapClient.getFeatures(testDevice));
-    }
-
     public void testSetPresetName() {
         if (!(mHasBluetooth && mIsHapClientSupported)) return;
 
