diff --git a/src/test/java/com/bandwidth/sdk/api/TranscriptionsApiTest.java b/src/test/java/com/bandwidth/sdk/api/TranscriptionsApiTest.java index 74c2250f..4f7ef3f6 100644 --- a/src/test/java/com/bandwidth/sdk/api/TranscriptionsApiTest.java +++ b/src/test/java/com/bandwidth/sdk/api/TranscriptionsApiTest.java @@ -88,12 +88,13 @@ public void getAndDeleteRealTimeTranscriptionsTest() throws ApiException, Interr TimeUnit.SECONDS.sleep(TEST_SLEEP); ApiResponse createCallResponse = callsApi.createCallWithHttpInfo(BW_ACCOUNT_ID, createMantecaCallBody); + + String callId = createCallResponse.getData().getCallId(); assertThat(createCallResponse.getStatusCode(), is(201)); // Redirect call to different url TimeUnit.SECONDS.sleep(TEST_SLEEP); - ApiResponse updateCallResponse = callsApi.updateCallBxmlWithHttpInfo(BW_ACCOUNT_ID, - createCallResponse.getData().getCallId(), bxmlBody); + ApiResponse updateCallResponse = callsApi.updateCallBxmlWithHttpInfo(BW_ACCOUNT_ID, callId, bxmlBody); assertThat(updateCallResponse.getStatusCode(), is(204)); @@ -107,10 +108,10 @@ public void getAndDeleteRealTimeTranscriptionsTest() throws ApiException, Interr // The Transcriptions API tests start here ApiResponse> listRealTimeTranscriptionResponse = transcriptionsApi.listRealTimeTranscriptionsWithHttpInfo(BW_ACCOUNT_ID, createCallResponse.getData().getCallId()); - String transcriptionId = listRealTimeTranscriptionResponse.getData().get(0).getTranscriptionId(); + String transcriptionId = listRealTimeTranscriptionResponse.getData().toString(); TimeUnit.SECONDS.sleep(TEST_SLEEP); - ApiResponse getRealTimeTranscriptionResponse = transcriptionsApi.getRealTimeTranscriptionWithHttpInfo(BW_ACCOUNT_ID, createCallResponse.getData().getCallId(), transcriptionId); + ApiResponse getRealTimeTranscriptionResponse = transcriptionsApi.getRealTimeTranscriptionWithHttpInfo(BW_ACCOUNT_ID, callId, transcriptionId); assertThat(getRealTimeTranscriptionResponse.getStatusCode(), is(200)); assertThat(getRealTimeTranscriptionResponse.getData(), hasProperty("transcriptId", is(instanceOf(String.class))));