98 {
99
100 WindowManager mockWindowManager = mock(WindowManager.class);
101 SingleViewFakeWindowViewGroup mockSingleViewFakeWindowViewGroup =
102 mock(SingleViewFakeWindowViewGroup.class);
103
104 WindowManagerHandler windowManagerHandler =
105 new WindowManagerHandler(mockWindowManager, mockSingleViewFakeWindowViewGroup);
106
107
108 Executor mockExecutor = mock(Executor.class);
109 @SuppressWarnings("Unchecked cast")
110 Consumer<Boolean> mockListener = (Consumer<Boolean>) mock(Consumer.class);
111
112 windowManagerHandler.getDefaultDisplay();
113 verify(mockWindowManager).getDefaultDisplay();
114
115 windowManagerHandler.getCurrentWindowMetrics();
116 verify(mockWindowManager).getCurrentWindowMetrics();
117
118 windowManagerHandler.getMaximumWindowMetrics();
119 verify(mockWindowManager).getMaximumWindowMetrics();
120
121 windowManagerHandler.isCrossWindowBlurEnabled();
122 verify(mockWindowManager).isCrossWindowBlurEnabled();
123
124 windowManagerHandler.addCrossWindowBlurEnabledListener(mockListener);
125 verify(mockWindowManager).addCrossWindowBlurEnabledListener(mockListener);
126
127 windowManagerHandler.addCrossWindowBlurEnabledListener(mockExecutor, mockListener);
128 verify(mockWindowManager).addCrossWindowBlurEnabledListener(mockExecutor, mockListener);
129
130 windowManagerHandler.removeCrossWindowBlurEnabledListener(mockListener);
131 verify(mockWindowManager).removeCrossWindowBlurEnabledListener(mockListener);
132 }