diff options
| author | Junyu Lai <junyulai@google.com> | 2022-01-16 14:20:20 +0000 |
|---|---|---|
| committer | Junyu Lai <junyulai@google.com> | 2022-01-20 15:06:50 +0000 |
| commit | 56f4a9c3d19f18c9fcecf1f1b25f204940c7a249 (patch) | |
| tree | c4224992932224168103887b1bd296d300f3e1eb /tests/unit/java/android/net/NetworkStatsCollectionTest.java | |
| parent | 7372824ecaaa351decba53cb440cd41dee894c63 (diff) | |
[MS57.2] Prepare APIs for data migration utility
Test: atest NetworkStatsHistoryTest#testBuilder
Bug: 204830222
Change-Id: I938c3ed50eea0f2349ea92c3824c637eaa77d328
Diffstat (limited to 'tests/unit/java/android/net/NetworkStatsCollectionTest.java')
| -rw-r--r-- | tests/unit/java/android/net/NetworkStatsCollectionTest.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unit/java/android/net/NetworkStatsCollectionTest.java b/tests/unit/java/android/net/NetworkStatsCollectionTest.java index 1c557d6443..870e88aa70 100644 --- a/tests/unit/java/android/net/NetworkStatsCollectionTest.java +++ b/tests/unit/java/android/net/NetworkStatsCollectionTest.java @@ -59,6 +59,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; +import org.mockito.Mockito; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; @@ -195,8 +196,8 @@ public class NetworkStatsCollectionTest { // record empty data straddling between buckets final NetworkStats.Entry entry = new NetworkStats.Entry(); entry.rxBytes = 32; - collection.recordData(null, UID_ALL, SET_DEFAULT, TAG_NONE, 30 * MINUTE_IN_MILLIS, - 90 * MINUTE_IN_MILLIS, entry); + collection.recordData(Mockito.mock(NetworkIdentitySet.class), UID_ALL, SET_DEFAULT, + TAG_NONE, 30 * MINUTE_IN_MILLIS, 90 * MINUTE_IN_MILLIS, entry); // assert that we report boundary in atomic buckets assertEquals(0, collection.getStartMillis()); |
