@@ -72,7 +72,7 @@ public void testScheduleNotificationWorkEnqueuesWithWorkManager() {
7272 Bundle data = new Bundle ();
7373 data .putString ("key" , "value" );
7474
75- scheduler .scheduleNotificationWork (data , false , null );
75+ scheduler .scheduleNotificationWork (data , null );
7676
7777 verify (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
7878 }
@@ -85,7 +85,7 @@ public void testScheduleNotificationWorkCallsSuccessCallback() {
8585 IterableNotificationWorkScheduler .SchedulerCallback callback =
8686 mock (IterableNotificationWorkScheduler .SchedulerCallback .class );
8787
88- scheduler .scheduleNotificationWork (data , false , callback );
88+ scheduler .scheduleNotificationWork (data , callback );
8989
9090 verify (callback ).onScheduleSuccess (any (UUID .class ));
9191 }
@@ -98,7 +98,7 @@ public void testScheduleNotificationWorkPassesWorkIdToCallback() {
9898 IterableNotificationWorkScheduler .SchedulerCallback callback =
9999 mock (IterableNotificationWorkScheduler .SchedulerCallback .class );
100100
101- scheduler .scheduleNotificationWork (data , false , callback );
101+ scheduler .scheduleNotificationWork (data , callback );
102102
103103 ArgumentCaptor <UUID > uuidCaptor = ArgumentCaptor .forClass (UUID .class );
104104 verify (callback ).onScheduleSuccess (uuidCaptor .capture ());
@@ -113,7 +113,7 @@ public void testScheduleNotificationWorkSucceedsWithNullCallback() {
113113 data .putString ("key" , "value" );
114114
115115 // Should not throw exception with null callback
116- scheduler .scheduleNotificationWork (data , false , null );
116+ scheduler .scheduleNotificationWork (data , null );
117117
118118 verify (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
119119 }
@@ -123,7 +123,7 @@ public void testScheduleNotificationWorkEnqueuesOnlyOnce() {
123123 Bundle data = new Bundle ();
124124 data .putString ("key" , "value" );
125125
126- scheduler .scheduleNotificationWork (data , false , null );
126+ scheduler .scheduleNotificationWork (data , null );
127127
128128 // Verify enqueue called exactly once
129129 verify (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
@@ -145,7 +145,7 @@ public void testScheduleNotificationWorkCallsFailureCallbackOnException() {
145145 IterableNotificationWorkScheduler .SchedulerCallback callback =
146146 mock (IterableNotificationWorkScheduler .SchedulerCallback .class );
147147
148- scheduler .scheduleNotificationWork (data , false , callback );
148+ scheduler .scheduleNotificationWork (data , callback );
149149
150150 verify (callback ).onScheduleFailure (any (Exception .class ), any (Bundle .class ));
151151 }
@@ -161,7 +161,7 @@ public void testScheduleNotificationWorkPassesExceptionToFailureCallback() {
161161 IterableNotificationWorkScheduler .SchedulerCallback callback =
162162 mock (IterableNotificationWorkScheduler .SchedulerCallback .class );
163163
164- scheduler .scheduleNotificationWork (data , false , callback );
164+ scheduler .scheduleNotificationWork (data , callback );
165165
166166 ArgumentCaptor <Exception > exceptionCaptor = ArgumentCaptor .forClass (Exception .class );
167167 verify (callback ).onScheduleFailure (exceptionCaptor .capture (), any (Bundle .class ));
@@ -180,7 +180,7 @@ public void testScheduleNotificationWorkPassesOriginalDataToFailureCallback() {
180180 IterableNotificationWorkScheduler .SchedulerCallback callback =
181181 mock (IterableNotificationWorkScheduler .SchedulerCallback .class );
182182
183- scheduler .scheduleNotificationWork (data , false , callback );
183+ scheduler .scheduleNotificationWork (data , callback );
184184
185185 ArgumentCaptor <Bundle > bundleCaptor = ArgumentCaptor .forClass (Bundle .class );
186186 verify (callback ).onScheduleFailure (any (Exception .class ), bundleCaptor .capture ());
@@ -198,7 +198,7 @@ public void testScheduleNotificationWorkHandlesFailureWithNullCallback() {
198198 .when (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
199199
200200 // Should not throw exception with null callback
201- scheduler .scheduleNotificationWork (data , false , null );
201+ scheduler .scheduleNotificationWork (data , null );
202202 }
203203
204204 // ========================================================================
@@ -211,7 +211,7 @@ public void testScheduleNotificationWorkPreservesNotificationData() {
211211 data .putString (IterableConstants .ITERABLE_DATA_TITLE , "Test Title" );
212212 data .putString (IterableConstants .ITERABLE_DATA_BODY , "Test Body" );
213213
214- scheduler .scheduleNotificationWork (data , false , null );
214+ scheduler .scheduleNotificationWork (data , null );
215215
216216 ArgumentCaptor <OneTimeWorkRequest > requestCaptor =
217217 ArgumentCaptor .forClass (OneTimeWorkRequest .class );
@@ -226,47 +226,11 @@ public void testScheduleNotificationWorkPreservesNotificationData() {
226226 assertTrue ("Should contain body" , jsonString .contains ("Test Body" ));
227227 }
228228
229- @ Test
230- public void testScheduleNotificationWorkHandlesGhostPushFlagTrue () {
231- Bundle data = new Bundle ();
232- data .putString ("key" , "value" );
233-
234- scheduler .scheduleNotificationWork (data , true , null );
235-
236- ArgumentCaptor <OneTimeWorkRequest > requestCaptor =
237- ArgumentCaptor .forClass (OneTimeWorkRequest .class );
238- verify (mockWorkManager ).enqueue (requestCaptor .capture ());
239-
240- OneTimeWorkRequest capturedRequest = requestCaptor .getValue ();
241- Data workData = capturedRequest .getWorkSpec ().input ;
242-
243- boolean isGhostPush = workData .getBoolean (IterableNotificationWorker .KEY_IS_GHOST_PUSH , false );
244- assertEquals ("Ghost push flag should be true" , true , isGhostPush );
245- }
246-
247- @ Test
248- public void testScheduleNotificationWorkHandlesGhostPushFlagFalse () {
249- Bundle data = new Bundle ();
250- data .putString ("key" , "value" );
251-
252- scheduler .scheduleNotificationWork (data , false , null );
253-
254- ArgumentCaptor <OneTimeWorkRequest > requestCaptor =
255- ArgumentCaptor .forClass (OneTimeWorkRequest .class );
256- verify (mockWorkManager ).enqueue (requestCaptor .capture ());
257-
258- OneTimeWorkRequest capturedRequest = requestCaptor .getValue ();
259- Data workData = capturedRequest .getWorkSpec ().input ;
260-
261- boolean isGhostPush = workData .getBoolean (IterableNotificationWorker .KEY_IS_GHOST_PUSH , true );
262- assertEquals ("Ghost push flag should be false" , false , isGhostPush );
263- }
264-
265229 @ Test
266230 public void testScheduleNotificationWorkHandlesEmptyBundle () {
267231 Bundle emptyData = new Bundle ();
268232
269- scheduler .scheduleNotificationWork (emptyData , false , null );
233+ scheduler .scheduleNotificationWork (emptyData , null );
270234
271235 verify (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
272236 }
@@ -278,7 +242,7 @@ public void testScheduleNotificationWorkPreservesMultipleFields() {
278242 data .putString ("field2" , "value2" );
279243 data .putString ("field3" , "value3" );
280244
281- scheduler .scheduleNotificationWork (data , false , null );
245+ scheduler .scheduleNotificationWork (data , null );
282246
283247 ArgumentCaptor <OneTimeWorkRequest > requestCaptor =
284248 ArgumentCaptor .forClass (OneTimeWorkRequest .class );
@@ -302,7 +266,7 @@ public void testScheduleNotificationWorkUsesCorrectWorkerClass() {
302266 Bundle data = new Bundle ();
303267 data .putString ("key" , "value" );
304268
305- scheduler .scheduleNotificationWork (data , false , null );
269+ scheduler .scheduleNotificationWork (data , null );
306270
307271 ArgumentCaptor <OneTimeWorkRequest > requestCaptor =
308272 ArgumentCaptor .forClass (OneTimeWorkRequest .class );
@@ -319,7 +283,7 @@ public void testScheduleNotificationWorkCreatesOneTimeRequest() {
319283 Bundle data = new Bundle ();
320284 data .putString ("key" , "value" );
321285
322- scheduler .scheduleNotificationWork (data , false , null );
286+ scheduler .scheduleNotificationWork (data , null );
323287
324288 // Verify a OneTimeWorkRequest was enqueued
325289 verify (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
@@ -330,7 +294,7 @@ public void testScheduleNotificationWorkSetsInputData() {
330294 Bundle data = new Bundle ();
331295 data .putString ("key" , "value" );
332296
333- scheduler .scheduleNotificationWork (data , false , null );
297+ scheduler .scheduleNotificationWork (data , null );
334298
335299 ArgumentCaptor <OneTimeWorkRequest > requestCaptor =
336300 ArgumentCaptor .forClass (OneTimeWorkRequest .class );
@@ -356,7 +320,7 @@ public void testSuccessCallbackIsCalledExactlyOnce() {
356320 IterableNotificationWorkScheduler .SchedulerCallback callback =
357321 mock (IterableNotificationWorkScheduler .SchedulerCallback .class );
358322
359- scheduler .scheduleNotificationWork (data , false , callback );
323+ scheduler .scheduleNotificationWork (data , callback );
360324
361325 verify (callback ).onScheduleSuccess (any (UUID .class ));
362326 verify (callback , never ()).onScheduleFailure (any (Exception .class ), any (Bundle .class ));
@@ -373,7 +337,7 @@ public void testFailureCallbackIsCalledExactlyOnce() {
373337 IterableNotificationWorkScheduler .SchedulerCallback callback =
374338 mock (IterableNotificationWorkScheduler .SchedulerCallback .class );
375339
376- scheduler .scheduleNotificationWork (data , false , callback );
340+ scheduler .scheduleNotificationWork (data , callback );
377341
378342 verify (callback ).onScheduleFailure (any (Exception .class ), any (Bundle .class ));
379343 verify (callback , never ()).onScheduleSuccess (any (UUID .class ));
@@ -385,7 +349,7 @@ public void testCallbacksAreOptional() {
385349 data .putString ("key" , "value" );
386350
387351 // Should work without callbacks (null)
388- scheduler .scheduleNotificationWork (data , false , null );
352+ scheduler .scheduleNotificationWork (data , null );
389353
390354 verify (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
391355 }
@@ -401,7 +365,7 @@ public void testFailureCallbackReceivesCorrectException() {
401365 IterableNotificationWorkScheduler .SchedulerCallback callback =
402366 mock (IterableNotificationWorkScheduler .SchedulerCallback .class );
403367
404- scheduler .scheduleNotificationWork (data , false , callback );
368+ scheduler .scheduleNotificationWork (data , callback );
405369
406370 ArgumentCaptor <Exception > exceptionCaptor = ArgumentCaptor .forClass (Exception .class );
407371 verify (callback ).onScheduleFailure (exceptionCaptor .capture (), any (Bundle .class ));
@@ -420,7 +384,7 @@ public void testFailureCallbackReceivesOriginalNotificationData() {
420384 IterableNotificationWorkScheduler .SchedulerCallback callback =
421385 mock (IterableNotificationWorkScheduler .SchedulerCallback .class );
422386
423- scheduler .scheduleNotificationWork (data , false , callback );
387+ scheduler .scheduleNotificationWork (data , callback );
424388
425389 ArgumentCaptor <Bundle > bundleCaptor = ArgumentCaptor .forClass (Bundle .class );
426390 verify (callback ).onScheduleFailure (any (Exception .class ), bundleCaptor .capture ());
@@ -474,7 +438,7 @@ public void testScheduleNotificationWorkCreatesValidInputData() {
474438 Bundle data = new Bundle ();
475439 data .putString (IterableConstants .ITERABLE_DATA_TITLE , "Title" );
476440
477- scheduler .scheduleNotificationWork (data , false , null );
441+ scheduler .scheduleNotificationWork (data , null );
478442
479443 ArgumentCaptor <OneTimeWorkRequest > requestCaptor =
480444 ArgumentCaptor .forClass (OneTimeWorkRequest .class );
@@ -489,7 +453,7 @@ public void testScheduleNotificationWorkIncludesAllRequiredKeys() {
489453 Bundle data = new Bundle ();
490454 data .putString ("key" , "value" );
491455
492- scheduler .scheduleNotificationWork (data , false , null );
456+ scheduler .scheduleNotificationWork (data , null );
493457
494458 ArgumentCaptor <OneTimeWorkRequest > requestCaptor =
495459 ArgumentCaptor .forClass (OneTimeWorkRequest .class );
@@ -500,11 +464,6 @@ public void testScheduleNotificationWorkIncludesAllRequiredKeys() {
500464 // Verify required keys are present
501465 assertNotNull ("Should have notification JSON" ,
502466 inputData .getString (IterableNotificationWorker .KEY_NOTIFICATION_DATA_JSON ));
503-
504- // Ghost push flag should be present (default false)
505- boolean hasFlag = inputData .getKeyValueMap ()
506- .containsKey (IterableNotificationWorker .KEY_IS_GHOST_PUSH );
507- assertTrue ("Should have ghost push flag" , hasFlag );
508467 }
509468
510469 @ Test
@@ -515,7 +474,7 @@ public void testScheduleNotificationWorkWithComplexData() {
515474 data .putString (IterableConstants .ITERABLE_DATA_BODY , "Body" );
516475 data .putString ("customField" , "customValue" );
517476
518- scheduler .scheduleNotificationWork (data , false , null );
477+ scheduler .scheduleNotificationWork (data , null );
519478
520479 verify (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
521480 }
@@ -529,7 +488,7 @@ public void testScheduleNotificationWorkHandlesSpecialCharactersInData() {
529488 Bundle data = new Bundle ();
530489 data .putString ("special" , "Value with symbols: !@#$% and \" quotes\" " );
531490
532- scheduler .scheduleNotificationWork (data , false , null );
491+ scheduler .scheduleNotificationWork (data , null );
533492
534493 verify (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
535494 }
@@ -539,7 +498,7 @@ public void testScheduleNotificationWorkHandlesUnicodeInData() {
539498 Bundle data = new Bundle ();
540499 data .putString ("unicode" , "Unicode: 你好 👋 émojis 🎉" );
541500
542- scheduler .scheduleNotificationWork (data , false , null );
501+ scheduler .scheduleNotificationWork (data , null );
543502
544503 verify (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
545504 }
@@ -551,7 +510,7 @@ public void testScheduleNotificationWorkHandlesLargeBundle() {
551510 data .putString ("key" + i , "value" + i );
552511 }
553512
554- scheduler .scheduleNotificationWork (data , false , null );
513+ scheduler .scheduleNotificationWork (data , null );
555514
556515 verify (mockWorkManager ).enqueue (any (OneTimeWorkRequest .class ));
557516 }
0 commit comments