File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 /**
Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments