Skip to content

Commit c4dc4d4

Browse files
fix test
1 parent 6a3ec0a commit c4dc4d4

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/com/mindee/MindeeClientV2.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ public JobResponse pollQueue(String jobId) {
5555
/**
5656
* Retrieve results for a previously enqueued document.
5757
*/
58-
public InferenceResponse parseQueued(String jobId) {
59-
if (jobId == null || jobId.trim().isEmpty()) {
58+
public InferenceResponse parseQueued(String inferenceId) {
59+
if (inferenceId == null || inferenceId.trim().isEmpty()) {
6060
throw new IllegalArgumentException("jobId must not be null or blank.");
6161
}
6262

63-
return mindeeApi.reqGetInference(jobId);
63+
return mindeeApi.reqGetInference(inferenceId);
6464
}
6565

6666
/**

src/test/java/com/mindee/MindeeClientV2Test.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ParseQueued {
5959
@DisplayName("hits the HTTP endpoint once and returns a non-null response")
6060
void document_getQueued_async() throws JsonProcessingException {
6161
MindeeApiV2 predictable = Mockito.mock(MindeeApiV2.class);
62-
String json = " {\"job\": {\"id\": \"dummy-id\", \"status\": \"Processing\"}}";
62+
String json = "{\"job\": {\"id\": \"dummy-id\", \"status\": \"Processing\"}}";
6363
ObjectMapper mapper = new ObjectMapper();
6464
mapper.findAndRegisterModules();
6565

@@ -70,7 +70,7 @@ void document_getQueued_async() throws JsonProcessingException {
7070

7171
MindeeClientV2 mindeeClient = makeClientWithMockedApi(predictable);
7272

73-
CommonResponse response = mindeeClient.parseQueued("dummy-id");
73+
CommonResponse response = mindeeClient.pollQueue("dummy-id");
7474
assertNotNull(response, "parseQueued() must return a response");
7575
verify(predictable, atMostOnce()).reqGetInference(anyString());
7676
}

0 commit comments

Comments
 (0)