ExtendedMockitoRule, a rule to make it easier to use Extended Mockito

It's derived from StaticMockFixtureRule (and moved from
FrameworksMockingServicesTests) but with a few more features:

- Easier to define which classes must be statically mocked or spied.
- Automatically starts mocking (so tests don't need a mockito runner
  or rule)
- Automatically clears the inlined mocks at the end (to avoid OOM)
- Allows other customization like strictness

Ignore-AOSP-First: would cause a merge conflict on internal master
Test: atest com.android.modules.utils.testing.ExtendedMockitoRuleTest
Bug: 281577492

Change-Id: I342ae3b37194862323b4b7001188defedd4560b6
Merged-In: I342ae3b37194862323b4b7001188defedd4560b6
(cherry picked from commit b106e5fb5d7cdef0fb8fd1529c87cb7cac793320)
(cherry picked from commit 6f76bfdb62c924f420f089e61892d34f4c40a9d5)
4 files changed
tree: 04473dd3905c139e9e767f1c1e7e2aa2151ba947
  1. build/
  2. java/
  3. javatests/
  4. jni/
  5. tools/
  6. .gitignore
  7. Android.bp
  8. OWNERS
  9. PREUPLOAD.cfg
  10. README.md
  11. TEST_MAPPING
README.md

frameworks/libs/modules-utils/

Libraries and utilities intended for use by module and framework code.

Since modules use the code in this project, it must adhere to mainline requirements, for example, by setting min_sdk_version in Soong modules.

Java code

This project uses a single source path for Java code. All Java code should go in the java directory with subdirectories corresponding to the java package. Android.bp files should go alongside the java source files, and should only include java source for a single java package to encourage good code hygiene.

Tests for java code should go in the javatests directory and follow the same structure.