Skip to content

Commit 4fba9d4

Browse files
Fix integration tests for non-Optional fields
Update tests to handle fields that are now non-Optional after adding required field arrays to the OpenAPI schema overrides: - TeamsTest: team.getId() now returns String directly - SegmentsTest: segment.getId() now returns String directly - ConversationsTest: conversationPart.getId() now returns String directly Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0648c91 commit 4fba9d4

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

src/test/java/com/intercom/api/integration/ConversationsTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,7 @@ public void testRedactConversationPart() {
318318
.conversationPartId(conversation
319319
.getConversationParts()
320320
.flatMap(parts -> parts.getConversationParts())
321-
.map(list -> list.get(2))
322-
.flatMap(part -> part.getId())
321+
.map(list -> list.get(2).getId())
323322
.orElse(""))
324323
.build()));
325324

src/test/java/com/intercom/api/integration/SegmentsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public void before() {
2424
.getSegments()
2525
.orElseThrow(() -> new RuntimeException("Segments list is required"))
2626
.get(0);
27-
segmentId = segment.getId().orElseThrow(() -> new RuntimeException("Segment ID is required"));
27+
segmentId = segment.getId();
2828
}
2929

3030
@Test

src/test/java/com/intercom/api/integration/TeamsTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ public void before() {
2323
.getTeams()
2424
.orElseThrow(() -> new RuntimeException("Teams list is required"))
2525
.get(0)
26-
.getId()
27-
.orElseThrow(() -> new RuntimeException("Team ID is required"));
26+
.getId();
2827
}
2928

3029
@Test

0 commit comments

Comments
 (0)