Skip to content

Commit

Permalink
[MODORDSTOR-435] Update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Saba-Zedginidze-EPAM committed Dec 19, 2024
1 parent e3481a4 commit 9d9246e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/folio/util/DbUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ private static <T> Future<List<T>> handleEntities(Future<Results<T>> getEntities

public static <T> List<T> getRowSetAsList(RowSet<Row> rowSet, Class<T> entityClass) {
return IteratorUtils.toList(rowSet.iterator()).stream()
.map(row -> row.toJson().getJsonObject("jsonb").mapTo(entityClass))
.toList();
.map(row -> row.toJson())
.map(json -> {
log.error("json: " + json);
return json.getJsonObject("jsonb").mapTo(entityClass);
}).toList();
}

public static <T> T convertResponseToEntity(Response response, Class<T> entityClass) {
Expand Down

0 comments on commit 9d9246e

Please sign in to comment.