The test relies on EthernetManager#setIncludeTestInterfaces to run validation on an "ethernet" network based on a tap interface, and simulates DHCP and HTTP servers so the device sees the capport DHCP option, and fetches the API contents. Bug: 156062304 Test: atest CaptivePortalApiTest (clean cherry-pick from aosp) Merged-In: I734dbd05c0f50b8dc4553102ab286f0d8807a7ac Change-Id: I734dbd05c0f50b8dc4553102ab286f0d8807a7ac