diff --git a/src/test/java/video/api/client/api/clients/CaptionsApiTest.java b/src/test/java/video/api/client/api/clients/CaptionsApiTest.java index b3bf124..89d2869 100644 --- a/src/test/java/video/api/client/api/clients/CaptionsApiTest.java +++ b/src/test/java/video/api/client/api/clients/CaptionsApiTest.java @@ -192,12 +192,12 @@ public void responseWithStatus200Test() throws ApiException { @Test @DisplayName("400 response") public void responseWithStatus400Test() throws ApiException { - answerOnAnyRequest(400, readResourceFile(PAYLOADS_PATH + "responses/400.json")); + answerOnAnyRequest(400, readResourceFile(PAYLOADS_PATH + "responses/400-0.json")); ApiException e = assertThrows(ApiException.class, - () -> api.update("vi4k0jvEUuaTdRAEjQ4Prklg", "en", new CaptionsUpdatePayload())); + () -> api.update("vi4k0jvEUuaTdRAEjQ4Prklg", "en_", new CaptionsUpdatePayload())); assertThat(e.getCode()).isEqualTo(400); - assertThat(e).hasMessageThat().contains("string (required)"); + assertThat(e).hasMessageThat().contains("An attribute is invalid."); } @Test