diff --git a/tests/robotests/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceControllerTest.java
index 974a52b..6ae670d 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceControllerTest.java
@@ -34,6 +34,7 @@
 
 import com.android.settings.R;
 import com.android.settings.nfc.NfcPreferenceController;
+import com.android.settings.testutils.shadow.ShadowNfcAdapter;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -43,7 +44,7 @@
 import org.robolectric.RuntimeEnvironment;
 import org.robolectric.Shadows;
 import org.robolectric.annotation.Config;
-import org.robolectric.shadows.ShadowNfcAdapter;
+import org.robolectric.shadow.api.Shadow;
 import org.robolectric.shadows.ShadowPackageManager;
 import org.robolectric.util.ReflectionHelpers;
 
@@ -70,7 +71,7 @@
         mContentResolver = mContext.getContentResolver();
         mNfcController = new NfcPreferenceController(mContext,
                 NfcPreferenceController.KEY_TOGGLE_NFC);
-        mShadowNfcAdapter = Shadows.shadowOf(NfcAdapter.getNfcAdapter(mContext));
+        mShadowNfcAdapter = Shadow.extract(NfcAdapter.getDefaultAdapter(mContext));
         mShadowPackageManager = Shadows.shadowOf(mContext.getPackageManager());
     }
 
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceDashboardFragmentTest.java b/tests/robotests/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceDashboardFragmentTest.java
index d6bcb12..aed3787 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceDashboardFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/AdvancedConnectedDeviceDashboardFragmentTest.java
@@ -18,7 +18,6 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.Mockito.spy;
-import static org.mockito.Mockito.when;
 
 import android.content.Context;
 import android.nfc.NfcAdapter;
@@ -26,35 +25,38 @@
 
 import com.android.settings.nfc.AndroidBeamPreferenceController;
 import com.android.settings.testutils.shadow.ShadowConnectivityManager;
+import com.android.settings.testutils.shadow.ShadowNfcAdapter;
 import com.android.settings.testutils.shadow.ShadowUserManager;
 import com.android.settingslib.drawer.CategoryKey;
 
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.mockito.Mock;
 import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
 import org.robolectric.annotation.Config;
+import org.robolectric.shadow.api.Shadow;
 
 import java.util.List;
 
 @RunWith(RobolectricTestRunner.class)
 @Config(shadows = {ShadowUserManager.class,
-        ShadowConnectivityManager.class})
+        ShadowConnectivityManager.class, ShadowNfcAdapter.class})
 public class AdvancedConnectedDeviceDashboardFragmentTest {
 
     private AdvancedConnectedDeviceDashboardFragment mFragment;
 
-    @Mock
-    private NfcAdapter mNfcAdapter;
+    private Context mContext;
+    private ShadowNfcAdapter mShadowNfcAdapter;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
 
+        mContext = spy(RuntimeEnvironment.application);
         mFragment = new AdvancedConnectedDeviceDashboardFragment();
+        mShadowNfcAdapter = Shadow.extract(NfcAdapter.getDefaultAdapter(mContext));
     }
 
     @Test
@@ -79,13 +81,10 @@
 
     @Test
     public void testSearchIndexProvider_correctNonIndexables() {
-        Context context = spy(RuntimeEnvironment.application);
-        when(context.getApplicationContext()).thenReturn(context);
-        when(NfcAdapter.getDefaultAdapter(context)).thenReturn(mNfcAdapter);
-        when(mNfcAdapter.isSecureNfcSupported()).thenReturn(true);
+        mShadowNfcAdapter.setSecureNfcSupported(true);
         final List<String> niks =
                 AdvancedConnectedDeviceDashboardFragment.SEARCH_INDEX_DATA_PROVIDER
-                        .getNonIndexableKeys(context);
+                        .getNonIndexableKeys(mContext);
 
         assertThat(niks).contains(AndroidBeamPreferenceController.KEY_ANDROID_BEAM_SETTINGS);
     }
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/NfcAndPaymentFragmentControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/NfcAndPaymentFragmentControllerTest.java
index ffaade3..8acb81c 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/NfcAndPaymentFragmentControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/NfcAndPaymentFragmentControllerTest.java
@@ -29,6 +29,7 @@
 import android.os.UserManager;
 
 import com.android.settings.R;
+import com.android.settings.testutils.shadow.ShadowNfcAdapter;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -37,9 +38,12 @@
 import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadow.api.Shadow;
 import org.robolectric.util.ReflectionHelpers;
 
 @RunWith(RobolectricTestRunner.class)
+@Config(shadows = ShadowNfcAdapter.class)
 public class NfcAndPaymentFragmentControllerTest {
     private NfcAndPaymentFragmentController mController;
     private Context mContext;
@@ -50,29 +54,28 @@
     private UserManager mUserManager;
     @Mock
     private NfcManager mNfcManager;
-    @Mock
-    private NfcAdapter mNfcAdapter;
+
+    private ShadowNfcAdapter mShadowNfcAdapter;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         mContext = spy(RuntimeEnvironment.application);
+        mShadowNfcAdapter = Shadow.extract(NfcAdapter.getDefaultAdapter(mContext));
 
         when(mContext.getApplicationContext()).thenReturn(mContext);
         when(mContext.getPackageManager()).thenReturn(mPackageManager);
         when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
         when(mContext.getSystemService(Context.NFC_SERVICE)).thenReturn(mNfcManager);
-        when(NfcAdapter.getDefaultAdapter(mContext)).thenReturn(mNfcAdapter);
 
         mController = new NfcAndPaymentFragmentController(mContext, "fakeKey");
-        ReflectionHelpers.setField(mController, "mNfcAdapter", mNfcAdapter);
     }
 
     @Test
     public void getAvailabilityStatus_hasNfc_shouldReturnAvailable() {
         when(mPackageManager.hasSystemFeature(anyString())).thenReturn(true);
         when(mUserManager.isAdminUser()).thenReturn(true);
-        when(mNfcAdapter.isEnabled()).thenReturn(true);
+        mShadowNfcAdapter.setEnabled(true);
 
         assertThat(mController.getAvailabilityStatus())
                 .isEqualTo(NfcAndPaymentFragmentController.AVAILABLE);
@@ -87,14 +90,14 @@
 
     @Test
     public void getSummary_nfcOn_shouldProvideOnSummary() {
-        when(mNfcAdapter.isEnabled()).thenReturn(true);
+        mShadowNfcAdapter.setEnabled(true);
         assertThat(mController.getSummary().toString()).contains(
                 mContext.getString(R.string.switch_on_text));
     }
 
     @Test
     public void getSummary_nfcOff_shouldProvideOffSummary() {
-        when(mNfcAdapter.isEnabled()).thenReturn(false);
+        mShadowNfcAdapter.setEnabled(false);
         assertThat(mController.getSummary().toString()).contains(
                 mContext.getString(R.string.switch_off_text));
     }
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/NfcAndPaymentFragmentTest.java b/tests/robotests/src/com/android/settings/connecteddevice/NfcAndPaymentFragmentTest.java
index 46c9cbb..dea0c73 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/NfcAndPaymentFragmentTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/NfcAndPaymentFragmentTest.java
@@ -22,9 +22,12 @@
 import static org.mockito.Mockito.when;
 
 import android.content.Context;
+import android.content.pm.PackageManager;
 import android.nfc.NfcAdapter;
 import android.provider.SearchIndexableResource;
 
+import com.android.settings.testutils.shadow.ShadowNfcAdapter;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -32,16 +35,20 @@
 import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadow.api.Shadow;
 
 import java.util.List;
 
 @RunWith(RobolectricTestRunner.class)
+@Config(shadows = ShadowNfcAdapter.class)
 public class NfcAndPaymentFragmentTest {
+    @Mock
+    private PackageManager mPackageManager;
+
     private NfcAndPaymentFragment mFragment;
     private Context mContext;
-
-    @Mock
-    private NfcAdapter mNfcAdapter;
+    private ShadowNfcAdapter mShadowNfcAdapter;
 
     @Before
     public void setUp() {
@@ -49,6 +56,9 @@
 
         mFragment = new NfcAndPaymentFragment();
         mContext = spy(RuntimeEnvironment.application);
+        mShadowNfcAdapter = Shadow.extract(NfcAdapter.getDefaultAdapter(mContext));
+
+        when(mContext.getPackageManager()).thenReturn(mPackageManager);
     }
 
     @Test
@@ -64,8 +74,10 @@
     @Test
     public void searchIndexProvider_shouldIndexValidItems() {
         when(mContext.getApplicationContext()).thenReturn(mContext);
-        when(NfcAdapter.getDefaultAdapter(mContext)).thenReturn(mNfcAdapter);
-        when(mNfcAdapter.isSecureNfcSupported()).thenReturn(true);
+        when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_NFC)).thenReturn(true);
+        when(mPackageManager.hasSystemFeature(
+                PackageManager.FEATURE_NFC_HOST_CARD_EMULATION)).thenReturn(true);
+        mShadowNfcAdapter.setSecureNfcSupported(true);
 
         final List<String> niks = NfcAndPaymentFragment.SEARCH_INDEX_DATA_PROVIDER
                 .getNonIndexableKeys(mContext);
diff --git a/tests/robotests/src/com/android/settings/nfc/AndroidBeamPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/nfc/AndroidBeamPreferenceControllerTest.java
index cd70d66..7e15618 100644
--- a/tests/robotests/src/com/android/settings/nfc/AndroidBeamPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/nfc/AndroidBeamPreferenceControllerTest.java
@@ -31,6 +31,7 @@
 
 import androidx.preference.PreferenceScreen;
 
+import com.android.settings.testutils.shadow.ShadowNfcAdapter;
 import com.android.settingslib.RestrictedLockUtilsInternal;
 import com.android.settingslib.RestrictedPreference;
 
@@ -41,19 +42,20 @@
 import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadow.api.Shadow;
 import org.robolectric.util.ReflectionHelpers;
 
 import java.util.ArrayList;
 import java.util.List;
 
 @RunWith(RobolectricTestRunner.class)
+@Config(shadows = ShadowNfcAdapter.class)
 public class AndroidBeamPreferenceControllerTest {
 
     Context mContext;
     @Mock
-    private NfcAdapter mNfcAdapter;
-    @Mock
-    NfcManager mManager;
+    NfcManager mNfcManager;
     @Mock
     private UserManager mUserManager;
     @Mock
@@ -63,18 +65,19 @@
 
     private RestrictedPreference mAndroidBeamPreference;
     private AndroidBeamPreferenceController mAndroidBeamController;
+    private ShadowNfcAdapter mShadowNfcAdapter;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         mContext = spy(RuntimeEnvironment.application);
+        mShadowNfcAdapter = Shadow.extract(NfcAdapter.getDefaultAdapter(mContext));
 
         when(mContext.getApplicationContext()).thenReturn(mContext);
         when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
-        when(mContext.getSystemService(Context.NFC_SERVICE)).thenReturn(mManager);
+        when(mContext.getSystemService(Context.NFC_SERVICE)).thenReturn(mNfcManager);
         when(RestrictedLockUtilsInternal.hasBaseUserRestriction(mContext,
                 UserManager.DISALLOW_OUTGOING_BEAM, UserHandle.myUserId())).thenReturn(false);
-        when(NfcAdapter.getDefaultAdapter(mContext)).thenReturn(mNfcAdapter);
 
         mAndroidBeamController = new AndroidBeamPreferenceController(mContext,
                 AndroidBeamPreferenceController.KEY_ANDROID_BEAM_SETTINGS);
@@ -95,13 +98,13 @@
 
     @Test
     public void isAvailable_hasNfc_shouldReturnTrue() {
-        when(mNfcAdapter.isEnabled()).thenReturn(true);
+        mShadowNfcAdapter.setEnabled(true);
         assertThat(mAndroidBeamController.isAvailable()).isTrue();
     }
 
     @Test
     public void isAvailable_noNfcFeature_shouldReturnFalse() {
-        when(mNfcAdapter.isEnabled()).thenReturn(true);
+        mShadowNfcAdapter.setEnabled(true);
         when(mPackageManager.hasSystemFeature(PackageManager.FEATURE_NFC_BEAM)).thenReturn(false);
         assertThat(mAndroidBeamController.isAvailable()).isFalse();
     }
@@ -114,7 +117,7 @@
 
     @Test
     public void isBeamEnable_disAllowBeam_shouldReturnFalse() {
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_OFF);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_OFF);
 
         when(RestrictedLockUtilsInternal.hasBaseUserRestriction(mContext,
                 UserManager.DISALLOW_OUTGOING_BEAM, UserHandle.myUserId())).thenReturn(true);
@@ -125,7 +128,7 @@
 
     @Test
     public void isBeamEnable_nfcStateOn_shouldReturnTrue() {
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_ON);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_ON);
         try {
             mAndroidBeamController.onResume();
         } catch (NullPointerException e) {
@@ -137,22 +140,22 @@
 
     @Test
     public void isBeamEnable_nfcStateNotOn_shouldReturnFalse() {
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_OFF);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_OFF);
         mAndroidBeamController.onResume();
         assertThat(mAndroidBeamPreference.isEnabled()).isFalse();
 
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_ON);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_TURNING_ON);
         mAndroidBeamController.onResume();
         assertThat(mAndroidBeamPreference.isEnabled()).isFalse();
 
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_OFF);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_TURNING_OFF);
         mAndroidBeamController.onResume();
         assertThat(mAndroidBeamPreference.isEnabled()).isFalse();
     }
 
     @Test
     public void updateNonIndexableKeys_available_shouldNotUpdate() {
-        when(mNfcAdapter.isEnabled()).thenReturn(true);
+        mShadowNfcAdapter.setEnabled(true);
         final List<String> keys = new ArrayList<>();
 
         mAndroidBeamController.updateNonIndexableKeys(keys);
diff --git a/tests/robotests/src/com/android/settings/nfc/NfcPaymentPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/nfc/NfcPaymentPreferenceControllerTest.java
index b69e172..026fdee 100644
--- a/tests/robotests/src/com/android/settings/nfc/NfcPaymentPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/nfc/NfcPaymentPreferenceControllerTest.java
@@ -29,6 +29,7 @@
 
 import com.android.settings.R;
 import com.android.settings.nfc.PaymentBackend.PaymentAppInfo;
+import com.android.settings.testutils.shadow.ShadowNfcAdapter;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -37,10 +38,12 @@
 import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
 
 import java.util.ArrayList;
 
 @RunWith(RobolectricTestRunner.class)
+@Config(shadows = ShadowNfcAdapter.class)
 public class NfcPaymentPreferenceControllerTest {
 
     private static final String PREF_KEY = PaymentSettingsTest.PAYMENT_KEY;
diff --git a/tests/robotests/src/com/android/settings/nfc/NfcPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/nfc/NfcPreferenceControllerTest.java
index 872c712..1d05162 100644
--- a/tests/robotests/src/com/android/settings/nfc/NfcPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/nfc/NfcPreferenceControllerTest.java
@@ -35,6 +35,7 @@
 
 import com.android.settings.nfc.NfcPreferenceController.NfcSliceWorker;
 import com.android.settings.nfc.NfcPreferenceController.NfcSliceWorker.NfcUpdateReceiver;
+import com.android.settings.testutils.shadow.ShadowNfcAdapter;
 
 import org.junit.Before;
 import org.junit.Test;
@@ -43,17 +44,18 @@
 import org.mockito.MockitoAnnotations;
 import org.robolectric.RobolectricTestRunner;
 import org.robolectric.RuntimeEnvironment;
+import org.robolectric.annotation.Config;
+import org.robolectric.shadow.api.Shadow;
 import org.robolectric.util.ReflectionHelpers;
 
 import java.util.ArrayList;
 import java.util.List;
 
 @RunWith(RobolectricTestRunner.class)
+@Config(shadows = ShadowNfcAdapter.class)
 public class NfcPreferenceControllerTest {
 
     @Mock
-    private NfcAdapter mNfcAdapter;
-    @Mock
     NfcManager mManager;
     @Mock
     private UserManager mUserManager;
@@ -63,16 +65,19 @@
     private Context mContext;
     private SwitchPreference mNfcPreference;
     private NfcPreferenceController mNfcController;
+    private ShadowNfcAdapter mShadowNfcAdapter;
+    private NfcAdapter mNfcAdapter;
 
     @Before
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         mContext = spy(RuntimeEnvironment.application);
+        mShadowNfcAdapter = Shadow.extract(NfcAdapter.getDefaultAdapter(mContext));
+        mNfcAdapter = NfcAdapter.getDefaultAdapter(mContext);
 
         when(mContext.getApplicationContext()).thenReturn(mContext);
         when(mContext.getSystemService(Context.USER_SERVICE)).thenReturn(mUserManager);
         when(mContext.getSystemService(Context.NFC_SERVICE)).thenReturn(mManager);
-        when(NfcAdapter.getDefaultAdapter(mContext)).thenReturn(mNfcAdapter);
 
         mNfcController = new NfcPreferenceController(mContext,
                 NfcPreferenceController.KEY_TOGGLE_NFC);
@@ -83,7 +88,7 @@
 
     @Test
     public void getAvailabilityStatus_hasNfc_shouldReturnAvailable() {
-        when(mNfcAdapter.isEnabled()).thenReturn(true);
+        mShadowNfcAdapter.setEnabled(true);
         assertThat(mNfcController.getAvailabilityStatus())
                 .isEqualTo(NfcPreferenceController.AVAILABLE);
     }
@@ -98,11 +103,11 @@
     @Test
     public void isNfcEnable_nfcStateNotTurning_shouldReturnTrue() {
         mNfcController.displayPreference(mScreen);
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_ON);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_ON);
         mNfcController.onResume();
         assertThat(mNfcPreference.isEnabled()).isTrue();
 
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_OFF);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_OFF);
         mNfcController.onResume();
         assertThat(mNfcPreference.isEnabled()).isTrue();
     }
@@ -110,11 +115,11 @@
     @Test
     public void isNfcEnable_nfcStateTurning_shouldReturnFalse() {
         mNfcController.displayPreference(mScreen);
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_ON);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_TURNING_ON);
         mNfcController.onResume();
         assertThat(mNfcPreference.isEnabled()).isFalse();
 
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_OFF);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_TURNING_OFF);
         mNfcController.onResume();
         assertThat(mNfcPreference.isEnabled()).isFalse();
     }
@@ -122,29 +127,29 @@
     @Test
     public void isNfcChecked_nfcStateOn_shouldReturnTrue() {
         mNfcController.displayPreference(mScreen);
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_ON);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_ON);
         mNfcController.onResume();
         assertThat(mNfcPreference.isChecked()).isTrue();
 
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_ON);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_TURNING_ON);
         mNfcController.onResume();
         assertThat(mNfcPreference.isChecked()).isTrue();
     }
 
     @Test
     public void isNfcChecked_nfcStateOff_shouldReturnFalse() {
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_OFF);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_OFF);
         mNfcController.onResume();
         assertThat(mNfcPreference.isChecked()).isFalse();
 
-        when(mNfcAdapter.getAdapterState()).thenReturn(NfcAdapter.STATE_TURNING_OFF);
+        mShadowNfcAdapter.setAdapterState(NfcAdapter.STATE_TURNING_OFF);
         mNfcController.onResume();
         assertThat(mNfcPreference.isChecked()).isFalse();
     }
 
     @Test
     public void updateNonIndexableKeys_available_shouldNotUpdate() {
-        when(mNfcAdapter.isEnabled()).thenReturn(true);
+        mShadowNfcAdapter.setEnabled(true);
         final List<String> keys = new ArrayList<>();
 
         mNfcController.updateNonIndexableKeys(keys);
@@ -167,7 +172,7 @@
         mNfcController.setChecked(true);
         mNfcController.onResume();
 
-        verify(mNfcAdapter).enable();
+        assertThat(mNfcAdapter.isEnabled()).isTrue();
     }
 
     @Test
@@ -175,7 +180,7 @@
         mNfcController.setChecked(false);
         mNfcController.onResume();
 
-        verify(mNfcAdapter).disable();
+        assertThat(mNfcAdapter.isEnabled()).isFalse();
     }
 
     @Test
diff --git a/tests/robotests/src/com/android/settings/nfc/PaymentSettingsTest.java b/tests/robotests/src/com/android/settings/nfc/PaymentSettingsTest.java
index 525f3ef..dcf49a2 100644
--- a/tests/robotests/src/com/android/settings/nfc/PaymentSettingsTest.java
+++ b/tests/robotests/src/com/android/settings/nfc/PaymentSettingsTest.java
@@ -33,6 +33,8 @@
 import androidx.preference.PreferenceManager;
 import androidx.preference.PreferenceScreen;
 
+import com.android.settings.testutils.shadow.ShadowNfcAdapter;
+
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
@@ -48,7 +50,7 @@
 import java.util.List;
 
 @RunWith(RobolectricTestRunner.class)
-@Config(shadows = PaymentSettingsTest.ShadowPaymentBackend.class)
+@Config(shadows = {PaymentSettingsTest.ShadowPaymentBackend.class, ShadowNfcAdapter.class})
 public class PaymentSettingsTest {
 
     static final String PAYMENT_KEY = "nfc_payment";
diff --git a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowNfcAdapter.java b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowNfcAdapter.java
index fb8c068..54f665c 100644
--- a/tests/robotests/src/com/android/settings/testutils/shadow/ShadowNfcAdapter.java
+++ b/tests/robotests/src/com/android/settings/testutils/shadow/ShadowNfcAdapter.java
@@ -16,6 +16,8 @@
 
 package com.android.settings.testutils.shadow;
 
+import static org.robolectric.shadow.api.Shadow.newInstanceOf;
+
 import android.app.Activity;
 import android.content.Context;
 import android.nfc.NfcAdapter;
@@ -24,16 +26,18 @@
 import org.robolectric.annotation.Implementation;
 import org.robolectric.annotation.Implements;
 import org.robolectric.annotation.Resetter;
-import org.robolectric.util.ReflectionHelpers;
-import org.robolectric.util.ReflectionHelpers.ClassParameter;
 
 /**
  * Shadow of {@link NfcAdapter}.
  */
-@Implements(NfcAdapter.class)
-public class ShadowNfcAdapter {
+@Implements(value = NfcAdapter.class)
+public class ShadowNfcAdapter extends org.robolectric.shadows.ShadowNfcAdapter {
     private static boolean sReaderModeEnabled;
+    private static Object sNfcAdapter = newInstanceOf("android.nfc.NfcAdapter");
+
     private boolean mIsNfcEnabled = false;
+    private int mState = NfcAdapter.STATE_ON;
+    private boolean mIsSecureNfcSupported = false;
 
     @Implementation
     protected void enableReaderMode(Activity activity, NfcAdapter.ReaderCallback callback,
@@ -43,8 +47,7 @@
 
     @Implementation
     protected static NfcAdapter getDefaultAdapter(Context context) {
-        return ReflectionHelpers.callConstructor(
-                NfcAdapter.class, ClassParameter.from(Context.class, context));
+        return (NfcAdapter) sNfcAdapter;
     }
 
     @Implementation
@@ -52,6 +55,28 @@
         return mIsNfcEnabled;
     }
 
+    public void setEnabled(boolean enable) {
+        mIsNfcEnabled = enable;
+    }
+
+    @Implementation
+    protected int getAdapterState() {
+        return mState;
+    }
+
+    public void setAdapterState(int state) {
+        this.mState = state;
+    }
+
+    @Implementation
+    protected boolean isSecureNfcSupported() {
+        return mIsSecureNfcSupported;
+    }
+
+    public void setSecureNfcSupported(boolean supported) {
+        this.mIsSecureNfcSupported = supported;
+    }
+
     @Implementation
     protected boolean enable() {
         mIsNfcEnabled = true;
