summaryrefslogtreecommitdiff
path: root/tests/unit/java/android/net/NetworkStatsCollectionTest.java
diff options
context:
space:
mode:
authorJunyu Lai <junyulai@google.com>2022-01-21 04:26:57 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2022-01-21 04:26:57 +0000
commit015e5690af19055208e3e2156d406e2c9f507b96 (patch)
tree290b2c03b10b0adb7d9d15b982d9f2c243c304c3 /tests/unit/java/android/net/NetworkStatsCollectionTest.java
parente0322e3fd1d0ac1c66609ea22639b3098112a15a (diff)
parent56f4a9c3d19f18c9fcecf1f1b25f204940c7a249 (diff)
Merge "[MS57.2] Prepare APIs for data migration utility"
Diffstat (limited to 'tests/unit/java/android/net/NetworkStatsCollectionTest.java')
-rw-r--r--tests/unit/java/android/net/NetworkStatsCollectionTest.java5
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());