[Testing] use AndroidJUnit4 in new MultiNetworkHeaderControllerTest

1. Rather than mocking the PreferenceScreen, create an instance via
PreferenceManager. Rather than stubbing PreferenceScreen functions to
return the PreferenceCategory mock, the mock is inserted using public
functions.
2. PreferenceCategory active state is checked rather than verifying the
arguments of function calls.
3. mHeaderController test superclass overrides functions which use the
Lifecycle, because doReturn+when on Spy objects has undesired side
effects.
4. Looper message queue prepared for the PreferenceScreen.

Bug: 168130550
Diff: https://diff.googleplex.com/#key=w7a7L3seOowE
Test: atest -c MultiNetworkHeaderControllerTest
Merged-In: Ic66425aca4047d2eacd04509f3bfb315f6dd57fc
Change-Id: I07925cfbb05636bdf7f0efe1811405a01dcf6523
1 file changed