@@ -127,7 +127,7 @@ void testStartWithoutTag() throws ApiException, AuthUnauthorizedException {
127127 void testStartInvalidExistingFeeds (String invalidExistingFeedId ) throws ApiException , AuthUnauthorizedException {
128128 when (datafeedApi .listDatafeed (TOKEN , TOKEN , null ))
129129 .thenReturn (Collections .singletonList (new V5Datafeed ().id (invalidExistingFeedId )));
130- when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ())).thenReturn (
130+ when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) )).thenReturn (
131131 new V5Datafeed ().id (DATAFEED_ID ));
132132
133133 AckId ackId = new AckId ().ackId (datafeedService .getAckId ());
@@ -138,7 +138,7 @@ void testStartInvalidExistingFeeds(String invalidExistingFeedId) throws ApiExcep
138138
139139 this .datafeedService .start ();
140140
141- V5DatafeedCreateBody datafeedCreateBody = new V5DatafeedCreateBody ();
141+ V5DatafeedCreateBody datafeedCreateBody = new V5DatafeedCreateBody (). includeInvisible ( true ) ;
142142 verify (datafeedApi , times (1 )).listDatafeed (TOKEN , TOKEN , null );
143143 verify (datafeedApi , times (1 )).createDatafeed (TOKEN , TOKEN , datafeedCreateBody );
144144 verify (datafeedApi , times (1 )).readDatafeed (DATAFEED_ID , TOKEN , TOKEN , ackId );
@@ -149,7 +149,7 @@ void testStartInvalidExistingFeeds(String invalidExistingFeedId) throws ApiExcep
149149 void testStartValidExistingFeeds (String validExistingFeedId ) throws ApiException , AuthUnauthorizedException {
150150 when (datafeedApi .listDatafeed (TOKEN , TOKEN , null ))
151151 .thenReturn (Collections .singletonList (new V5Datafeed ().id (validExistingFeedId )));
152- when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ())).thenReturn (
152+ when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) )).thenReturn (
153153 new V5Datafeed ().id (validExistingFeedId ));
154154
155155 AckId ackId = new AckId ().ackId (datafeedService .getAckId ());
@@ -160,7 +160,7 @@ void testStartValidExistingFeeds(String validExistingFeedId) throws ApiException
160160
161161 this .datafeedService .start ();
162162
163- V5DatafeedCreateBody datafeedCreateBody = new V5DatafeedCreateBody ();
163+ V5DatafeedCreateBody datafeedCreateBody = new V5DatafeedCreateBody (). includeInvisible ( true ) ;
164164 verify (datafeedApi , times (1 )).listDatafeed (TOKEN , TOKEN , null );
165165 verify (datafeedApi , times (0 )).createDatafeed (TOKEN , TOKEN , datafeedCreateBody );
166166 verify (datafeedApi , times (1 )).readDatafeed (validExistingFeedId , TOKEN , TOKEN , ackId );
@@ -337,7 +337,7 @@ private ArgumentMatcher<AckId> eqAckId(String ackId) {
337337 @ Test
338338 void testStartEmptyListDatafeed () throws ApiException , AuthUnauthorizedException {
339339 when (datafeedApi .listDatafeed (TOKEN , TOKEN , null )).thenReturn (Collections .emptyList ());
340- when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ())).thenReturn (
340+ when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) )).thenReturn (
341341 new V5Datafeed ().id (DATAFEED_ID ));
342342 AckId initialAckId = new AckId ().ackId ("" );
343343 final String secondAckId = "ack-id" ;
@@ -349,11 +349,11 @@ void testStartEmptyListDatafeed() throws ApiException, AuthUnauthorizedException
349349 this .datafeedService .start ();
350350
351351 verify (datafeedApi , times (1 )).listDatafeed (TOKEN , TOKEN , null );
352- verify (datafeedApi , times (1 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ());
352+ verify (datafeedApi , times (1 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) );
353353 verify (datafeedApi , times (1 )).readDatafeed (DATAFEED_ID , TOKEN , TOKEN , initialAckId );
354354 assertEquals (secondAckId , datafeedService .getAckId ());
355355 }
356-
356+
357357 @ Test
358358 void testClientErrorTriggersDatafeedRecreation () throws ApiException , AuthUnauthorizedException {
359359 when (datafeedApi .listDatafeed (TOKEN , TOKEN , null )).thenReturn (
@@ -370,7 +370,7 @@ void testClientErrorTriggersDatafeedRecreation() throws ApiException, AuthUnauth
370370 .thenThrow (new ApiException (400 , "" ));
371371 when (datafeedApi .deleteDatafeed (DATAFEED_ID , TOKEN , TOKEN )).thenReturn (null );
372372
373- when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ())).thenReturn (
373+ when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) )).thenReturn (
374374 new V5Datafeed ().id (secondDatafeedId ));
375375 when (datafeedApi .readDatafeed (secondDatafeedId , TOKEN , TOKEN , initialAckId ))
376376 .thenReturn (new V5EventList ().addEventsItem (
@@ -470,43 +470,43 @@ void testStartErrorListDatafeedThenRetrySuccess() throws ApiException, AuthUnaut
470470 @ Test
471471 void testStartAuthErrorCreateDatafeed () throws ApiException , AuthUnauthorizedException {
472472 when (datafeedApi .listDatafeed (TOKEN , TOKEN , null )).thenReturn (Collections .emptyList ());
473- when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ())).thenThrow (
473+ when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) )).thenThrow (
474474 new ApiException (401 , "unauthorized-error" ));
475475 doThrow (AuthUnauthorizedException .class ).when (authSession ).refresh ();
476476
477477 assertThrows (AuthUnauthorizedException .class , this .datafeedService ::start );
478478 verify (datafeedApi , times (1 )).listDatafeed (TOKEN , TOKEN , null );
479- verify (datafeedApi , times (1 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ());
479+ verify (datafeedApi , times (1 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) );
480480 }
481481
482482 @ Test
483483 void testStartClientErrorCreateDatafeed () throws ApiException {
484484 when (datafeedApi .listDatafeed (TOKEN , TOKEN , null )).thenReturn (Collections .emptyList ());
485- when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ())).thenThrow (
485+ when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) )).thenThrow (
486486 new ApiException (400 , "client-error" ));
487487
488488 assertThrows (ApiException .class , this .datafeedService ::start );
489489 verify (datafeedApi , times (1 )).listDatafeed (TOKEN , TOKEN , null );
490- verify (datafeedApi , times (2 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ());
490+ verify (datafeedApi , times (2 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) );
491491 }
492492
493493 @ Test
494494 void testStartServerErrorCreateDatafeed () throws ApiException {
495495 when (datafeedApi .listDatafeed (TOKEN , TOKEN , null )).thenReturn (Collections .emptyList ());
496- when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ())).thenThrow (
496+ when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) )).thenThrow (
497497 new ApiException (502 , "server-error" ));
498498
499499 assertThrows (ApiException .class , this .datafeedService ::start );
500500 verify (datafeedApi , times (1 )).listDatafeed (TOKEN , TOKEN , null );
501- verify (datafeedApi , times (2 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ());
501+ verify (datafeedApi , times (2 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) );
502502 }
503503
504504 @ Test
505505 void testStartClientErrorReadDatafeedAndClientErrorCreateDatafeed () throws ApiException , AuthUnauthorizedException {
506506 AckId ackId = new AckId ().ackId (datafeedService .getAckId ());
507507 when (datafeedApi .listDatafeed (TOKEN , TOKEN , null )).thenReturn (
508508 Collections .singletonList (new V5Datafeed ().id (DATAFEED_ID )));
509- when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ()))
509+ when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) ))
510510 .thenThrow (new ApiException (400 , "ALB: No matching rule found" ))
511511 .thenReturn (new V5Datafeed ().id ("recreate-df-id" ));
512512 when (datafeedApi .readDatafeed (DATAFEED_ID , TOKEN , TOKEN , ackId )).thenThrow (new ApiException (400 , "client-error" ));
@@ -520,7 +520,7 @@ void testStartClientErrorReadDatafeedAndClientErrorCreateDatafeed() throws ApiEx
520520 verify (datafeedApi , times (1 )).readDatafeed (DATAFEED_ID , TOKEN , TOKEN , ackId );
521521 verify (datafeedApi , times (1 )).readDatafeed ("recreate-df-id" , TOKEN , TOKEN , ackId );
522522 verify (datafeedApi , times (1 )).deleteDatafeed (DATAFEED_ID , TOKEN , TOKEN );
523- verify (datafeedApi , times (2 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ());
523+ verify (datafeedApi , times (2 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) );
524524 }
525525
526526 @ Test
@@ -613,7 +613,7 @@ void testStartClientErrorDeleteDatafeed() throws ApiException, AuthUnauthorizedE
613613 AckId ackId = new AckId ().ackId (datafeedService .getAckId ());
614614 when (datafeedApi .listDatafeed (TOKEN , TOKEN , null )).thenReturn (
615615 Collections .singletonList (new V5Datafeed ().id (DATAFEED_ID )));
616- when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ())).thenReturn (
616+ when (datafeedApi .createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) )).thenReturn (
617617 new V5Datafeed ().id ("recreate-df-id" ));
618618 when (datafeedApi .readDatafeed (DATAFEED_ID , TOKEN , TOKEN , ackId )).thenThrow (new ApiException (400 , "client-error" ));
619619 when (datafeedApi .readDatafeed ("recreate-df-id" , TOKEN , TOKEN , ackId ))
@@ -626,7 +626,7 @@ void testStartClientErrorDeleteDatafeed() throws ApiException, AuthUnauthorizedE
626626 verify (datafeedApi , times (1 )).listDatafeed (TOKEN , TOKEN , null );
627627 verify (datafeedApi , times (1 )).readDatafeed (DATAFEED_ID , TOKEN , TOKEN , ackId );
628628 verify (datafeedApi , times (1 )).readDatafeed ("recreate-df-id" , TOKEN , TOKEN , ackId );
629- verify (datafeedApi , times (1 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody ());
629+ verify (datafeedApi , times (1 )).createDatafeed (TOKEN , TOKEN , new V5DatafeedCreateBody (). includeInvisible ( true ) );
630630 verify (datafeedApi , times (1 )).deleteDatafeed (DATAFEED_ID , TOKEN , TOKEN );
631631 }
632632
0 commit comments