@@ -1009,7 +1009,7 @@ public void testFindMatchingBigQueryObjects_Routines_ListWithPattern() throws Ex
10091009 Routine func1 = mockBigQueryRoutine (catalog , schema , "func_123" , "FUNCTION" , "f1" );
10101010 Routine otherProc = mockBigQueryRoutine (catalog , schema , "another_proc" , "PROCEDURE" , "p3" );
10111011
1012- Page <Routine > page = mock (Page .class );
1012+ Page <Routine > page = mock (Page .class , withSettings (). withoutAnnotations () );
10131013 when (page .iterateAll ()).thenReturn (Arrays .asList (proc1 , func1 , proc2 , otherProc ));
10141014 when (bigqueryClient .listRoutines (eq (datasetId ), any (BigQuery .RoutineListOption [].class )))
10151015 .thenReturn (page );
@@ -1053,7 +1053,7 @@ public void testFindMatchingBigQueryObjects_Routines_ListNoPattern() throws Exce
10531053 Routine proc1 = mockBigQueryRoutine (catalog , schema , "proc_abc" , "PROCEDURE" , "p1" );
10541054 Routine func1 = mockBigQueryRoutine (catalog , schema , "func_123" , "FUNCTION" , "f1" );
10551055
1056- Page <Routine > page = mock (Page .class );
1056+ Page <Routine > page = mock (Page .class , withSettings (). withoutAnnotations () );
10571057 when (page .iterateAll ()).thenReturn (Arrays .asList (proc1 , func1 ));
10581058 when (bigqueryClient .listRoutines (eq (datasetId ), any (BigQuery .RoutineListOption [].class )))
10591059 .thenReturn (page );
@@ -1545,12 +1545,12 @@ public void testListMatchingProcedureIdsFromDatasets() throws Exception {
15451545 Routine func1_ds1 = mockBigQueryRoutine (catalog , schema1Name , "func_b" , "FUNCTION" , "desc b" );
15461546 Routine proc2_ds2 = mockBigQueryRoutine (catalog , schema2Name , "proc_c" , "PROCEDURE" , "desc c" );
15471547
1548- Page <Routine > page1 = mock (Page .class );
1548+ Page <Routine > page1 = mock (Page .class , withSettings (). withoutAnnotations () );
15491549 when (page1 .iterateAll ()).thenReturn (Arrays .asList (proc1_ds1 , func1_ds1 ));
15501550 when (bigqueryClient .listRoutines (eq (dataset1 .getDatasetId ()), any (RoutineListOption .class )))
15511551 .thenReturn (page1 );
15521552
1553- Page <Routine > page2 = mock (Page .class );
1553+ Page <Routine > page2 = mock (Page .class , withSettings (). withoutAnnotations () );
15541554 when (page2 .iterateAll ()).thenReturn (Collections .singletonList (proc2_ds2 ));
15551555 when (bigqueryClient .listRoutines (eq (dataset2 .getDatasetId ()), any (RoutineListOption .class )))
15561556 .thenReturn (page2 );
@@ -3309,20 +3309,20 @@ public void testGetSchemas_WithProjectDiscovery() throws SQLException {
33093309 when (bigQueryConnection .getDiscoveredProjects ()).thenReturn (Arrays .asList ("discovered-1" ));
33103310 when (bigQueryConnection .getAdditionalProjects ()).thenReturn ("additional-1" );
33113311
3312- Page <Dataset > pagePrimary = mock (Page .class );
3312+ Page <Dataset > pagePrimary = mock (Page .class , withSettings (). withoutAnnotations () );
33133313 Dataset dsPrimary = mockBigQueryDataset ("primary-project" , "dataset_p" );
33143314 when (pagePrimary .iterateAll ()).thenReturn (Collections .singletonList (dsPrimary ));
33153315 when (bigqueryClient .listDatasets (
33163316 eq ("primary-project" ), any (BigQuery .DatasetListOption [].class )))
33173317 .thenReturn (pagePrimary );
33183318
3319- Page <Dataset > pageAdditional = mock (Page .class );
3319+ Page <Dataset > pageAdditional = mock (Page .class , withSettings (). withoutAnnotations () );
33203320 Dataset dsAdditional = mockBigQueryDataset ("additional-1" , "dataset_a" );
33213321 when (pageAdditional .iterateAll ()).thenReturn (Collections .singletonList (dsAdditional ));
33223322 when (bigqueryClient .listDatasets (eq ("additional-1" ), any (BigQuery .DatasetListOption [].class )))
33233323 .thenReturn (pageAdditional );
33243324
3325- Page <Dataset > pageDiscovered = mock (Page .class );
3325+ Page <Dataset > pageDiscovered = mock (Page .class , withSettings (). withoutAnnotations () );
33263326 Dataset dsDiscovered = mockBigQueryDataset ("discovered-1" , "dataset_d" );
33273327 when (pageDiscovered .iterateAll ()).thenReturn (Collections .singletonList (dsDiscovered ));
33283328 when (bigqueryClient .listDatasets (eq ("discovered-1" ), any (BigQuery .DatasetListOption [].class )))
@@ -3354,14 +3354,14 @@ public void testGetSchemas_WithoutProjectDiscovery() throws SQLException {
33543354 when (bigQueryConnection .getDiscoveredProjects ()).thenReturn (Arrays .asList ("discovered-1" ));
33553355 when (bigQueryConnection .getAdditionalProjects ()).thenReturn ("additional-1" );
33563356
3357- Page <Dataset > pagePrimary = mock (Page .class );
3357+ Page <Dataset > pagePrimary = mock (Page .class , withSettings (). withoutAnnotations () );
33583358 Dataset dsPrimary = mockBigQueryDataset ("primary-project" , "dataset_p" );
33593359 when (pagePrimary .iterateAll ()).thenReturn (Collections .singletonList (dsPrimary ));
33603360 when (bigqueryClient .listDatasets (
33613361 eq ("primary-project" ), any (BigQuery .DatasetListOption [].class )))
33623362 .thenReturn (pagePrimary );
33633363
3364- Page <Dataset > pageAdditional = mock (Page .class );
3364+ Page <Dataset > pageAdditional = mock (Page .class , withSettings (). withoutAnnotations () );
33653365 Dataset dsAdditional = mockBigQueryDataset ("additional-1" , "dataset_a" );
33663366 when (pageAdditional .iterateAll ()).thenReturn (Collections .singletonList (dsAdditional ));
33673367 when (bigqueryClient .listDatasets (eq ("additional-1" ), any (BigQuery .DatasetListOption [].class )))
@@ -3388,7 +3388,7 @@ public void testGetSchemas_WithoutProjectDiscovery() throws SQLException {
33883388 }
33893389
33903390 private void mockDatasetIteration (DatasetId datasetId ) {
3391- Page <Dataset > pagePrimary = mock (Page .class );
3391+ Page <Dataset > pagePrimary = mock (Page .class , withSettings (). withoutAnnotations () );
33923392 Dataset dsPrimary = mock (Dataset .class );
33933393 when (dsPrimary .getDatasetId ()).thenReturn (datasetId );
33943394 when (pagePrimary .iterateAll ()).thenReturn (Collections .singletonList (dsPrimary ));
@@ -3411,7 +3411,7 @@ private Table mockTableWithConstraints(TableId tableId, TableConstraints constra
34113411 }
34123412
34133413 private void mockTableIteration (DatasetId datasetId , Table ... tables ) {
3414- Page <Table > pageTables = mock (Page .class );
3414+ Page <Table > pageTables = mock (Page .class , withSettings (). withoutAnnotations () );
34153415 when (pageTables .iterateAll ()).thenReturn (Arrays .asList (tables ));
34163416 when (bigqueryClient .listTables (eq (datasetId ), any (BigQuery .TableListOption [].class )))
34173417 .thenReturn (pageTables );
0 commit comments