Skip to content

Commit e1a04aa

Browse files
smoghe-bwclaude
andcommitted
fix: handle nullable tag in smoke listEndpointsTest
The endpoint is created without a tag, so getTag() returns null on listed endpoints. Use anyOf(nullValue(), instanceOf(String.class)) instead of a strict instanceOf check. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 8882a81 commit e1a04aa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/test/java/com/bandwidth/sdk/smoke/EndpointsApiTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929
import static org.hamcrest.MatcherAssert.assertThat;
3030
import static org.hamcrest.CoreMatchers.instanceOf;
3131
import static org.hamcrest.CoreMatchers.equalTo;
32+
import static org.hamcrest.CoreMatchers.anyOf;
33+
import static org.hamcrest.CoreMatchers.nullValue;
3234
import static org.hamcrest.Matchers.is;
3335

3436
import static com.bandwidth.sdk.utils.TestingEnvironmentVariables.*;
@@ -83,7 +85,7 @@ public void listEndpointsTest() throws ApiException {
8385
assertThat(firstEndpoint.getStatus(), instanceOf(EndpointStatusEnum.class));
8486
assertThat(firstEndpoint.getCreationTimestamp(), instanceOf(OffsetDateTime.class));
8587
assertThat(firstEndpoint.getExpirationTimestamp(), instanceOf(OffsetDateTime.class));
86-
assertThat(firstEndpoint.getTag(), instanceOf(String.class));
88+
assertThat(firstEndpoint.getTag(), anyOf(nullValue(), instanceOf(String.class)));
8789
}
8890

8991
@Test

0 commit comments

Comments
 (0)