From a3895b878dab0fd9d0770fe39488e12aac06c38c Mon Sep 17 00:00:00 2001 From: Dave Mankoff Date: Wed, 12 Feb 2020 12:20:53 -0500 Subject: [PATCH] Include rowContentBindStage mock in NotificationEntryManagerTest. This test is flaky because sometimes it succeeds in inflating its ExpandableNotificationRow, and sometimes it doesn't. When it does succeed, it is currently getting an NPE. This CL fixes the NPE, as one of the methods that needed mocking was missing. Bug: 149391269 Test: atest SystemUITests Change-Id: Ic869c0badba3db619b42a781194dfbdb4ee1a59b --- .../statusbar/notification/NotificationEntryManagerTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java index 5a0a495e1f851..f1fba792a882d 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/NotificationEntryManagerTest.java @@ -281,6 +281,9 @@ public class NotificationEntryManagerTest extends SysuiTestCase { when(mExpandableNotificationRowComponentBuilder .inflationCallback(any())) .thenReturn(mExpandableNotificationRowComponentBuilder); + when(mExpandableNotificationRowComponentBuilder + .rowContentBindStage(any())) + .thenReturn(mExpandableNotificationRowComponentBuilder); when(mExpandableNotificationRowComponentBuilder .onExpandClickListener(any())) .thenReturn(mExpandableNotificationRowComponentBuilder);