@@ -76,8 +76,7 @@ void testCreateUpdateDeleteChannelType() throws Exception {
7676 client
7777 .chat ()
7878 .updateChannelType (
79- typeName ,
80- UpdateChannelTypeRequest .builder ().typingEvents (false ).build ())
79+ typeName , UpdateChannelTypeRequest .builder ().typingEvents (false ).build ())
8180 .execute ();
8281 assertNotNull (updateResp .getData ());
8382 assertEquals (Boolean .FALSE , updateResp .getData ().getTypingEvents ());
@@ -103,7 +102,8 @@ void testCreateUpdateDeleteChannelType() throws Exception {
103102 }
104103 }
105104 if (deleteErr != null ) {
106- System .err .println ("Warning: failed to delete channel type " + typeName + ": " + deleteErr .getMessage ());
105+ System .err .println (
106+ "Warning: failed to delete channel type " + typeName + ": " + deleteErr .getMessage ());
107107 }
108108 }
109109 }
@@ -113,7 +113,8 @@ void testCreateUpdateDeleteChannelType() throws Exception {
113113 void testListChannelTypes () throws Exception {
114114 var listResp = client .chat ().listChannelTypes ().execute ();
115115 assertNotNull (listResp .getData ().getChannelTypes ());
116- assertTrue (listResp .getData ().getChannelTypes ().size () > 0 , "Should have at least one channel type" );
116+ assertTrue (
117+ listResp .getData ().getChannelTypes ().size () > 0 , "Should have at least one channel type" );
117118 // Default channel types should be present
118119 assertTrue (
119120 listResp .getData ().getChannelTypes ().containsKey ("messaging" ),
@@ -262,9 +263,7 @@ void testCreateListDeleteDevice() throws Exception {
262263
263264 // List devices and verify found
264265 var listResp =
265- client
266- .listDevices (ListDevicesRequest .builder ().UserID (userId ).build ())
267- .execute ();
266+ client .listDevices (ListDevicesRequest .builder ().UserID (userId ).build ()).execute ();
268267
269268 assertNotNull (listResp .getData ().getDevices ());
270269 boolean found = false ;
@@ -284,9 +283,7 @@ void testCreateListDeleteDevice() throws Exception {
284283
285284 // Verify deleted
286285 var listAfterDelete =
287- client
288- .listDevices (ListDevicesRequest .builder ().UserID (userId ).build ())
289- .execute ();
286+ client .listDevices (ListDevicesRequest .builder ().UserID (userId ).build ()).execute ();
290287
291288 if (listAfterDelete .getData ().getDevices () != null ) {
292289 for (DeviceResponse d : listAfterDelete .getData ().getDevices ()) {
@@ -322,8 +319,10 @@ void testGetPermission() throws Exception {
322319 var resp = client .getPermission ("create-channel" ).execute ();
323320 assertNotNull (resp .getData (), "Response data should not be null" );
324321 assertNotNull (resp .getData ().getPermission (), "Permission should not be null" );
325- assertEquals ("create-channel" , resp .getData ().getPermission ().getId (), "Permission ID should match" );
326- assertNotNull (resp .getData ().getPermission ().getAction (), "Permission action should not be null" );
322+ assertEquals (
323+ "create-channel" , resp .getData ().getPermission ().getId (), "Permission ID should match" );
324+ assertNotNull (
325+ resp .getData ().getPermission ().getAction (), "Permission action should not be null" );
327326 assertFalse (
328327 resp .getData ().getPermission ().getAction ().isEmpty (),
329328 "Permission action should not be empty" );
@@ -431,11 +430,7 @@ void testExportChannels() throws Exception {
431430 .exportChannels (
432431 ExportChannelsRequest .builder ()
433432 .channels (
434- List .of (
435- ChannelExport .builder ()
436- .type ("messaging" )
437- .id (channelId )
438- .build ()))
433+ List .of (ChannelExport .builder ().type ("messaging" ).id (channelId ).build ()))
439434 .build ())
440435 .execute ();
441436
@@ -481,11 +476,7 @@ void testMuteUnmuteUser() throws Exception {
481476 // Mute target user as muter
482477 var muteResp =
483478 moderation
484- .mute (
485- MuteRequest .builder ()
486- .targetIds (List .of (targetId ))
487- .userID (muterId )
488- .build ())
479+ .mute (MuteRequest .builder ().targetIds (List .of (targetId )).userID (muterId ).build ())
489480 .execute ();
490481
491482 assertNotNull (muteResp .getData (), "Mute response data should not be null" );
@@ -502,11 +493,7 @@ void testMuteUnmuteUser() throws Exception {
502493 // Unmute the target user
503494 var unmuteResp =
504495 moderation
505- .unmute (
506- UnmuteRequest .builder ()
507- .targetIds (List .of (targetId ))
508- .userID (muterId )
509- .build ())
496+ .unmute (UnmuteRequest .builder ().targetIds (List .of (targetId )).userID (muterId ).build ())
510497 .execute ();
511498
512499 assertNotNull (unmuteResp .getData (), "Unmute response data should not be null" );
@@ -555,9 +542,7 @@ void testThreads() throws Exception {
555542 .queryThreads (
556543 QueryThreadsRequest .builder ()
557544 .userID (userId1 )
558- .filter (
559- Map .of (
560- "channel_cid" , Map .of ("$eq" , channelCid )))
545+ .filter (Map .of ("channel_cid" , Map .of ("$eq" , channelCid )))
561546 .build ())
562547 .execute ();
563548
@@ -579,9 +564,7 @@ void testThreads() throws Exception {
579564 var getResp =
580565 client
581566 .chat ()
582- .getThread (
583- parentId ,
584- GetThreadRequest .builder ().ReplyLimit (10 ).build ())
567+ .getThread (parentId , GetThreadRequest .builder ().ReplyLimit (10 ).build ())
585568 .execute ();
586569
587570 assertNotNull (getResp .getData (), "GetThread response should not be null" );
@@ -591,8 +574,7 @@ void testThreads() throws Exception {
591574 getResp .getData ().getThread ().getParentMessageID (),
592575 "Thread parent message ID should match" );
593576 assertNotNull (
594- getResp .getData ().getThread ().getLatestReplies (),
595- "Latest replies should not be null" );
577+ getResp .getData ().getThread ().getLatestReplies (), "Latest replies should not be null" );
596578 assertTrue (
597579 getResp .getData ().getThread ().getLatestReplies ().size () >= 2 ,
598580 "Thread should have at least 2 replies" );
@@ -632,9 +614,7 @@ void testGetUnreadCountsBatch() throws Exception {
632614 client
633615 .chat ()
634616 .unreadCountsBatch (
635- UnreadCountsBatchRequest .builder ()
636- .userIds (List .of (readerId1 ))
637- .build ())
617+ UnreadCountsBatchRequest .builder ().userIds (List .of (readerId1 )).build ())
638618 .execute ();
639619
640620 assertNotNull (resp .getData (), "Batch unread counts response should not be null" );
@@ -647,8 +627,7 @@ void testGetUnreadCountsBatch() throws Exception {
647627 assertNotNull (counts , "Counts for readerId1 should not be null" );
648628 assertNotNull (counts .getTotalUnreadCount (), "Total unread count should not be null" );
649629 assertTrue (
650- counts .getTotalUnreadCount () >= 1 ,
651- "readerId1 should have at least 1 unread message" );
630+ counts .getTotalUnreadCount () >= 1 , "readerId1 should have at least 1 unread message" );
652631
653632 } finally {
654633 try {
@@ -773,9 +752,7 @@ void testReminders() throws Exception {
773752 var deleteResp =
774753 client
775754 .chat ()
776- .deleteReminder (
777- messageId ,
778- DeleteReminderRequest .builder ().UserID (userId ).build ())
755+ .deleteReminder (messageId , DeleteReminderRequest .builder ().UserID (userId ).build ())
779756 .execute ();
780757
781758 assertNotNull (deleteResp .getData (), "DeleteReminder response should not be null" );
@@ -818,8 +795,7 @@ void testGetUnreadCounts() throws Exception {
818795 .execute ();
819796
820797 assertNotNull (resp .getData (), "Unread counts response should not be null" );
821- assertNotNull (
822- resp .getData ().getTotalUnreadCount (), "Total unread count should not be null" );
798+ assertNotNull (resp .getData ().getTotalUnreadCount (), "Total unread count should not be null" );
823799 assertTrue (
824800 resp .getData ().getTotalUnreadCount () >= 1 ,
825801 "Reader should have at least 1 unread message" );
@@ -866,8 +842,7 @@ void testQueryTeamUsageStats() throws Exception {
866842 || msg .contains ("not available" )
867843 || msg .contains ("not supported" )
868844 || msg .contains ("not enabled" )) {
869- Assumptions .assumeTrue (
870- false , "QueryTeamUsageStats not available on this app: " + msg );
845+ Assumptions .assumeTrue (false , "QueryTeamUsageStats not available on this app: " + msg );
871846 }
872847 throw e ;
873848 }
@@ -901,8 +876,7 @@ void testChannelBatchUpdate() throws Exception {
901876 {
902877 put (
903878 "$in" ,
904- List .of (
905- "messaging:" + channelId1 , "messaging:" + channelId2 ));
879+ List .of ("messaging:" + channelId1 , "messaging:" + channelId2 ));
906880 }
907881 });
908882 }
@@ -933,8 +907,7 @@ void testChannelBatchUpdate() throws Exception {
933907
934908 } catch (io .getstream .exceptions .StreamException e ) {
935909 String msg = e .getMessage () != null ? e .getMessage () : "" ;
936- Integer statusCode =
937- e .getResponseData () != null ? e .getResponseData ().getStatusCode () : null ;
910+ Integer statusCode = e .getResponseData () != null ? e .getResponseData ().getStatusCode () : null ;
938911 // ChannelBatchUpdate is behind Beta — skip gracefully on any server-side error.
939912 // The API may return "ChannelBatchUpdate failed with error: <empty>" when the
940913 // beta feature is not enabled for this app.
@@ -957,9 +930,7 @@ void testChannelBatchUpdate() throws Exception {
957930 client
958931 .chat ()
959932 .deleteChannel (
960- "messaging" ,
961- channelId ,
962- DeleteChannelRequest .builder ().HardDelete (true ).build ())
933+ "messaging" , channelId , DeleteChannelRequest .builder ().HardDelete (true ).build ())
963934 .execute ();
964935 } catch (Exception ignored ) {
965936 }
0 commit comments