@@ -75,8 +75,7 @@ public void setApplicationContext_initializeGaugeMetadataManager()
7575 throws ExecutionException , InterruptedException {
7676 when (mockPerfSession .isVerbose ()).thenReturn (true );
7777 InOrder inOrder = Mockito .inOrder (mockGaugeManager );
78- SessionManager testSessionManager =
79- new SessionManager (mockGaugeManager , mockPerfSession , mockAppStateMonitor );
78+ SessionManager testSessionManager = new SessionManager (mockGaugeManager , mockPerfSession );
8079 testSessionManager .setApplicationContext (mockApplicationContext );
8180
8281 inOrder .verify (mockGaugeManager ).initializeGaugeMetadataManager (any ());
@@ -90,8 +89,7 @@ public void setApplicationContext_initializeGaugeMetadataManager()
9089 public void testUpdatePerfSessionMakesGaugeManagerStopCollectingGaugesIfSessionIsNonVerbose () {
9190 forceNonVerboseSession ();
9291
93- SessionManager testSessionManager =
94- new SessionManager (mockGaugeManager , mockPerfSession , mockAppStateMonitor );
92+ SessionManager testSessionManager = new SessionManager (mockGaugeManager , mockPerfSession );
9593 testSessionManager .updatePerfSession (createTestSession (1 ));
9694
9795 verify (mockGaugeManager ).stopCollectingGauges ();
@@ -101,8 +99,7 @@ public void testUpdatePerfSessionMakesGaugeManagerStopCollectingGaugesIfSessionI
10199 public void testUpdatePerfSessionMakesGaugeManagerStopCollectingGaugesWhenSessionsDisabled () {
102100 forceSessionsFeatureDisabled ();
103101
104- SessionManager testSessionManager =
105- new SessionManager (mockGaugeManager , createTestSession (1 ), mockAppStateMonitor );
102+ SessionManager testSessionManager = new SessionManager (mockGaugeManager , createTestSession (1 ));
106103 testSessionManager .updatePerfSession (createTestSession (2 ));
107104
108105 verify (mockGaugeManager ).stopCollectingGauges ();
@@ -114,8 +111,7 @@ public void testSessionIdDoesNotUpdateIfPerfSessionRunsTooLong() {
114111 when (mockClock .getTime ()).thenReturn (mockTimer );
115112
116113 PerfSession session = new PerfSession (testSessionId (1 ), mockClock );
117- SessionManager testSessionManager =
118- new SessionManager (mockGaugeManager , session , mockAppStateMonitor );
114+ SessionManager testSessionManager = new SessionManager (mockGaugeManager , session );
119115
120116 assertThat (session .isSessionRunningTooLong ()).isFalse ();
121117
@@ -138,8 +134,7 @@ public void testUpdatePerfSessionStartsCollectingGaugesIfSessionIsVerbose() {
138134 PerfSession newSession = createTestSession (2 );
139135 newSession .setGaugeAndEventCollectionEnabled (true );
140136
141- SessionManager testSessionManager =
142- new SessionManager (mockGaugeManager , previousSession , mockAppStateMonitor );
137+ SessionManager testSessionManager = new SessionManager (mockGaugeManager , previousSession );
143138 testSessionManager .updatePerfSession (newSession );
144139 testSessionManager .setApplicationContext (mockApplicationContext );
145140
@@ -149,8 +144,7 @@ public void testUpdatePerfSessionStartsCollectingGaugesIfSessionIsVerbose() {
149144
150145 @ Test
151146 public void testPerfSession_sessionAwareObjects_doesntNotifyIfNotRegistered () {
152- SessionManager testSessionManager =
153- new SessionManager (mockGaugeManager , mockPerfSession , mockAppStateMonitor );
147+ SessionManager testSessionManager = new SessionManager (mockGaugeManager , mockPerfSession );
154148
155149 FakeSessionAwareObject spySessionAwareObjectOne = spy (new FakeSessionAwareObject ());
156150 FakeSessionAwareObject spySessionAwareObjectTwo = spy (new FakeSessionAwareObject ());
@@ -165,8 +159,7 @@ public void testPerfSession_sessionAwareObjects_doesntNotifyIfNotRegistered() {
165159
166160 @ Test
167161 public void testPerfSession_sessionAwareObjects_NotifiesIfRegistered () {
168- SessionManager testSessionManager =
169- new SessionManager (mockGaugeManager , mockPerfSession , mockAppStateMonitor );
162+ SessionManager testSessionManager = new SessionManager (mockGaugeManager , mockPerfSession );
170163
171164 FakeSessionAwareObject spySessionAwareObjectOne = spy (new FakeSessionAwareObject ());
172165 FakeSessionAwareObject spySessionAwareObjectTwo = spy (new FakeSessionAwareObject ());
@@ -185,8 +178,7 @@ public void testPerfSession_sessionAwareObjects_NotifiesIfRegistered() {
185178
186179 @ Test
187180 public void testPerfSession_sessionAwareObjects_DoesNotNotifyIfUnregistered () {
188- SessionManager testSessionManager =
189- new SessionManager (mockGaugeManager , mockPerfSession , mockAppStateMonitor );
181+ SessionManager testSessionManager = new SessionManager (mockGaugeManager , mockPerfSession );
190182
191183 FakeSessionAwareObject spySessionAwareObjectOne = spy (new FakeSessionAwareObject ());
192184 FakeSessionAwareObject spySessionAwareObjectTwo = spy (new FakeSessionAwareObject ());
0 commit comments