Minor improvements on ApiCallStats and ApiCallStatsTest.
ApiCallStats:
- Make it final
- Hide constructor
- Encapsulated fields
- Removed redundant @NonNull annotations
- Throws (ISE instead of IAE) when both app and sdk name are set
ApiCallStatsTest:
- Extends AdServiceUnitTestCase
- Uses Truth instead of JUnit assertions
- Added tests for equals() / hashcode() / toString()
- Split testIncompleteInputBuilder_throwsIAE in 2 tests
- Uses non-zero result code
Test: atest AdServicesServiceCoreUnitTests:ApiCallStatsTest
Bug: 270974848
Change-Id: I6d623cd549ccde12ba06d9bbfdd7b7fe4caf6666
3 files changed