Skip to content

Commit 8f623b6

Browse files
tempsave
1 parent 1abf645 commit 8f623b6

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package com.mindee.parsing.common;
2+
3+
import com.fasterxml.jackson.databind.JavaType;
4+
import com.fasterxml.jackson.databind.ObjectMapper;
5+
import com.mindee.product.invoicesplitter.InvoiceSplitterV1;
6+
import java.io.File;
7+
import java.io.IOException;
8+
9+
public class WorkflowResponseTest {
10+
private WorkflowResponse<InvoiceSplitterV1> loadWorkflowResponse(String filePath) throws
11+
IOException {
12+
ObjectMapper objectMapper = new ObjectMapper();
13+
objectMapper.findAndRegisterModules();
14+
15+
JavaType type = objectMapper.getTypeFactory().constructParametricType(
16+
WorkflowResponse.class,
17+
InvoiceSplitterV1.class
18+
);
19+
return objectMapper.readValue(new File(filePath), type);
20+
}
21+
}

0 commit comments

Comments
 (0)