99import com .bandwidth .sdk .model .EndpointResponse ;
1010import com .bandwidth .sdk .model .Endpoints ;
1111import com .bandwidth .sdk .model .EndpointDirectionEnum ;
12- import com .bandwidth .sdk .model .EndpointStatusEnum ;
1312import com .bandwidth .sdk .model .EndpointTypeEnum ;
1413import com .bandwidth .sdk .model .ListEndpointsResponse ;
15- import org .junit .jupiter .api .BeforeAll ;
1614import org .junit .jupiter .api .MethodOrderer ;
1715import org .junit .jupiter .api .Order ;
18- import org .junit .jupiter .api .AfterAll ;
1916import org .junit .jupiter .api .Test ;
2017import org .junit .jupiter .api .TestInstance ;
2118import org .junit .jupiter .api .TestMethodOrder ;
@@ -114,11 +111,12 @@ public void shouldRetrieveDetailsOfSpecificEndpoint() throws ApiException {
114111 assertThat (response .getData (), notNullValue ());
115112 assertThat (response .getData ().getErrors (), instanceOf (List .class ));
116113 assertThat (response .getData ().getErrors (), hasSize (0 ));
117- assertThat (response .getData (), hasProperty ("endpointId" , is (endpointId )));
118- assertThat (response .getData (), hasProperty ("type" , is (EndpointTypeEnum .WEBRTC )));
119- assertThat (response .getData (), hasProperty ("status" , notNullValue ()));
120- assertThat (response .getData (), hasProperty ("creationTimestamp" , notNullValue ()));
121- assertThat (response .getData (), hasProperty ("expirationTimestamp" , notNullValue ()));
114+ assertThat (response .getData ().getData (), notNullValue ());
115+ assertThat (response .getData ().getData (), hasProperty ("endpointId" , is (endpointId )));
116+ assertThat (response .getData ().getData (), hasProperty ("type" , is (EndpointTypeEnum .WEBRTC )));
117+ assertThat (response .getData ().getData (), hasProperty ("status" , notNullValue ()));
118+ assertThat (response .getData ().getData (), hasProperty ("creationTimestamp" , notNullValue ()));
119+ assertThat (response .getData ().getData (), hasProperty ("expirationTimestamp" , notNullValue ()));
122120 }
123121
124122 @ Test
@@ -130,14 +128,12 @@ public void shouldDeleteEndpoint() throws ApiException {
130128 }
131129
132130 @ Test
133- public void shouldThrow401UnauthorizedWithInvalidCredentials () throws ApiException {
131+ public void shouldThrow401UnauthorizedWithInvalidCredentials () {
134132 ApiClient badOauthClient = new ApiClient ("invalid-client-id" , "invalid-client-secret" , null );
135133 EndpointsApi endpointsApiBad = new EndpointsApi (badOauthClient );
136134
137- ApiException exception = Assertions .assertThrows (ApiException .class ,
135+ Assertions .assertThrows (ApiException .class ,
138136 () -> endpointsApiBad .listEndpointsWithHttpInfo (BW_ACCOUNT_ID , null , null , null , null ));
139-
140- assertThat (exception .getCode (), is (401 ));
141137 }
142138
143139 @ Test
0 commit comments