diff --git a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt b/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
deleted file mode 100644
index e92c906..0000000
--- a/tests/cts/net/src/android/net/cts/ApfIntegrationTest.kt
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2024 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package android.net.cts
-
-import android.content.pm.PackageManager.FEATURE_WIFI
-import android.net.ConnectivityManager
-import android.net.NetworkCapabilities
-import android.net.NetworkRequest
-import android.os.Build
-import android.system.OsConstants
-import androidx.test.platform.app.InstrumentationRegistry
-import com.android.compatibility.common.util.PropertyUtil.isVendorApiLevelNewerThan
-import com.android.compatibility.common.util.SystemUtil
-import com.android.testutils.DevSdkIgnoreRule
-import com.android.testutils.DevSdkIgnoreRunner
-import com.android.testutils.NetworkStackModuleTest
-import com.android.testutils.RecorderCallback.CallbackEntry.LinkPropertiesChanged
-import com.android.testutils.TestableNetworkCallback
-import com.google.common.truth.Truth.assertThat
-import kotlin.test.assertEquals
-import kotlin.test.assertNotNull
-import org.junit.Assume.assumeTrue
-import org.junit.Before
-import org.junit.Test
-import org.junit.runner.RunWith
-
-private const val TIMEOUT_MS = 2000L
-
-@RunWith(DevSdkIgnoreRunner::class)
-@NetworkStackModuleTest
-@DevSdkIgnoreRule.IgnoreUpTo(Build.VERSION_CODES.TIRAMISU)
-class ApfIntegrationTest {
-    private val context by lazy { InstrumentationRegistry.getInstrumentation().context }
-    private val cm by lazy { context.getSystemService(ConnectivityManager::class.java)!! }
-    private val pm by lazy { context.packageManager }
-    private lateinit var wifiIfaceName: String
-    @Before
-    fun setUp() {
-        assumeTrue(pm.hasSystemFeature(FEATURE_WIFI))
-        assumeTrue(isVendorApiLevelNewerThan(Build.VERSION_CODES.TIRAMISU))
-        val cb = TestableNetworkCallback()
-        cm.requestNetwork(
-                NetworkRequest.Builder()
-                        .addTransportType(NetworkCapabilities.TRANSPORT_WIFI)
-                        .addCapability(NetworkCapabilities.NET_CAPABILITY_INTERNET)
-                        .build(),
-                cb
-        )
-        cb.eventuallyExpect<LinkPropertiesChanged>(TIMEOUT_MS) {
-            wifiIfaceName = assertNotNull(it.lp.interfaceName)
-            true
-        }
-        assertNotNull(wifiIfaceName)
-    }
-
-    @Test
-    fun testGetApfCapabilities() {
-        val capabilities = SystemUtil
-                .runShellCommand("cmd network_stack apf $wifiIfaceName capabilities").trim()
-        val (version, maxLen, packetFormat) = capabilities.split(",").map { it.toInt() }
-        assertEquals(4, version)
-        assertThat(maxLen).isAtLeast(1024)
-        if (isVendorApiLevelNewerThan(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)) {
-            assertThat(maxLen).isAtLeast(2000)
-        }
-        assertEquals(OsConstants.ARPHRD_ETHER, packetFormat)
-    }
-}
