File tree Expand file tree Collapse file tree 3 files changed +5
-10
lines changed
src/test/java/com/intercom/api/integration Expand file tree Collapse file tree 3 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,7 @@ public void before() {
4242 client .contacts ().list (ListContactsRequest .builder ().perPage (1 ).build ());
4343
4444 // act
45- contactId = randomContacts
46- .getItems ()
47- .get (0 )
48- .getId ()
49- .orElseThrow (() -> new RuntimeException ("Contact ID is required" ));
45+ contactId = randomContacts .getItems ().get (0 ).getId ();
5046 company = client .companies ()
5147 .createOrUpdate (java .util .Optional .of (CreateOrUpdateCompanyRequest .builder ()
5248 .name (Utils .randomString ())
Original file line number Diff line number Diff line change @@ -61,13 +61,13 @@ public void before() {
6161 .create (CreateContactRequest .of (CreateContactRequest .WithExternalId .builder ()
6262 .externalId (Utils .randomString ())
6363 .build ()));
64- userId = user .getId (). orElseThrow (() -> new RuntimeException ( "User ID is required" )) ;
64+ userId = user .getId ();
6565 lead = client .contacts ()
6666 .create (CreateContactRequest .of (CreateContactRequest .WithRole .builder ()
6767 .role ("lead" )
6868 .name ("Marek Barek" )
6969 .build ()));
70- leadId = lead .getId (). orElseThrow (() -> new RuntimeException ( "Lead ID is required" )) ;
70+ leadId = lead .getId ();
7171 tag = client .tags ()
7272 .create (TagsCreateRequestBody .of (CreateOrUpdateTagRequest .builder ()
7373 .name (Utils .randomString ())
@@ -126,8 +126,7 @@ public void testTagConversation() {
126126 // act
127127 Tag response = client .tags ()
128128 .tagConversation (TagConversationRequest .builder ()
129- .conversationId (message .getConversationId ()
130- .orElseThrow (() -> new RuntimeException ("Conversation ID is required" )))
129+ .conversationId (message .getConversationId ())
131130 .tagId (tag .getId ())
132131 .adminId (adminId )
133132 .build ());
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ public void before() {
4242 .externalId (Utils .randomString ())
4343 .name ("Message Test User" )
4444 .build ()));
45- userId = user .getId (). orElseThrow (() -> new RuntimeException ( "User ID is required" )) ;
45+ userId = user .getId ();
4646 }
4747
4848 @ AfterEach
You can’t perform that action at this time.
0 commit comments