@@ -121,7 +121,7 @@ public void testTagContact() {
121121 .create (CreateContactRequest .of (CreateContactRequest .WithExternalId .builder ()
122122 .externalId (Utils .randomString ())
123123 .build ()));
124- String contactId = contact .getId (). orElseThrow (() -> new RuntimeException ( "Contact ID is required" )) ;
124+ String contactId = contact .getId ();
125125
126126 // act
127127 Tag response = client .tags ()
@@ -204,7 +204,7 @@ public void testTagConversation() {
204204 .externalId (Utils .randomString ())
205205 .name ("John Smith" )
206206 .build ()));
207- String contactId = contact .getId (). orElseThrow (() -> new RuntimeException ( "Contact ID is required" )) ;
207+ String contactId = contact .getId ();
208208
209209 Message conversationMessage = client .conversations ()
210210 .create (CreateConversationRequest .builder ()
@@ -228,12 +228,9 @@ public void testTagConversation() {
228228
229229 Conversation conversation = client .conversations ()
230230 .find (FindConversationRequest .builder ()
231- .conversationId (conversationMessage
232- .getConversationId ()
233- .orElseThrow (() -> new RuntimeException ("Conversation ID is required" )))
231+ .conversationId (conversationMessage .getConversationId ())
234232 .build ());
235- String conversationId =
236- conversation .getId ().orElseThrow (() -> new RuntimeException ("Conversation ID is required" ));
233+ String conversationId = conversation .getId ();
237234
238235 // act
239236 Tag response = client .tags ()
0 commit comments