Fix DevicePolicyManagerTest mocking
Prefer using doReturn+when instead of when+then for spied objects that are not pure mocks. This avoids implicit invocation of the real spied method implementation, with potentially invalid/unsupported values, when the method override is applied. Bug: 418727125 Test: atest DevicePolicyManagerTest Flag: build.RELEASE_USE_SYSTEM_FEATURE_XML_FOR_UNAVAILABLE_FEATURES Change-Id: I3dc464e78b5c460ed036c511baa3aac8a24145b8
Loading
Please register or sign in to comment