diff --git a/src/test/java/bio/terra/common/BQTestUtils.java b/src/test/java/bio/terra/common/BQTestUtils.java index 97a9eec211..5a2555520a 100644 --- a/src/test/java/bio/terra/common/BQTestUtils.java +++ b/src/test/java/bio/terra/common/BQTestUtils.java @@ -66,8 +66,11 @@ public static void mockBQQuery( private static Answer mockAnswer(Schema schema, List> results) { return a -> - new TableResult( - schema, results.size(), new PageImpl<>(null, null, convertValues(results, schema))); + TableResult.newBuilder() + .setSchema(schema) + .setTotalRows((long) results.size()) + .setPageNoSchema(new PageImpl<>(null, null, convertValues(results, schema))) + .build(); } private static List convertValues( diff --git a/src/test/java/bio/terra/service/tabulardata/google/bigquery/BigQueryPdaoUnitTest.java b/src/test/java/bio/terra/service/tabulardata/google/bigquery/BigQueryPdaoUnitTest.java index 9254738140..5c07ade72d 100644 --- a/src/test/java/bio/terra/service/tabulardata/google/bigquery/BigQueryPdaoUnitTest.java +++ b/src/test/java/bio/terra/service/tabulardata/google/bigquery/BigQueryPdaoUnitTest.java @@ -1061,7 +1061,8 @@ void aggregateSnapshotTableTest() { Page page = mockPage(listOfFieldValueList); - TableResult table = new TableResult(schema, 10, page); + TableResult table = + TableResult.newBuilder().setSchema(schema).setTotalRows(10L).setPageNoSchema(page).build(); List result = BigQueryPdao.aggregateTableData(table); @@ -1091,7 +1092,8 @@ void testAggregateTextColumnStats() { "2"))))); // For some reason, it wants the numeric value passed in as a // string - TableResult table = new TableResult(schema, 10, page); + TableResult table = + TableResult.newBuilder().setSchema(schema).setTotalRows(10L).setPageNoSchema(page).build(); List result = BigQueryPdao.aggregateTextColumnStats(table, columnName);