2323import static org .junit .jupiter .api .Assertions .assertSame ;
2424import static org .junit .jupiter .api .Assertions .assertThrows ;
2525import static org .junit .jupiter .api .Assertions .assertTrue ;
26- import static org .mockito .Mockito .any ;
2726import static org .mockito .Mockito .mock ;
2827import static org .mockito .Mockito .times ;
2928import static org .mockito .Mockito .verify ;
@@ -543,15 +542,15 @@ public void testGetDiscoveredProjects_Success() throws Exception {
543542 when (project2 .getProjectId ()).thenReturn ("discovered-p2" );
544543
545544 when (mockPage .iterateAll ()).thenReturn (Arrays .asList (project1 , project2 ));
546- when (mockBigQuery .listProjects (any ( BigQuery . ProjectListOption . class ) )).thenReturn (mockPage );
545+ when (mockBigQuery .listProjects ()).thenReturn (mockPage );
547546
548547 List <String > discovered = connection .getDiscoveredProjects ();
549548 assertEquals (Arrays .asList ("discovered-p1" , "discovered-p2" ), discovered );
550549
551550 // Verify caching: second call should not invoke listProjects again
552551 List <String > discoveredCached = connection .getDiscoveredProjects ();
553552 assertSame (discovered , discoveredCached );
554- verify (mockBigQuery , times (1 )).listProjects (any ( BigQuery . ProjectListOption . class ) );
553+ verify (mockBigQuery , times (1 )).listProjects ();
555554 }
556555 }
557556
@@ -562,7 +561,7 @@ public void testGetDiscoveredProjects_BigQueryExceptionThrown() throws Exception
562561 connection .bigQuery = mockBigQuery ;
563562
564563 BigQueryException exception = new BigQueryException (403 , "Access Denied" );
565- when (mockBigQuery .listProjects (any ( BigQuery . ProjectListOption . class ) )).thenThrow (exception );
564+ when (mockBigQuery .listProjects ()).thenThrow (exception );
566565
567566 // Verify that it throws BigQueryJdbcException
568567 BigQueryJdbcException ex =
@@ -582,7 +581,7 @@ public void testGetDiscoveredProjects_BigQueryExceptionThrown() throws Exception
582581 () -> {
583582 connection .getDiscoveredProjects ();
584583 });
585- verify (mockBigQuery , times (2 )).listProjects (any ( BigQuery . ProjectListOption . class ) );
584+ verify (mockBigQuery , times (2 )).listProjects ();
586585 }
587586 }
588587
@@ -593,7 +592,7 @@ public void testGetDiscoveredProjects_OtherExceptionThrown() throws Exception {
593592 connection .bigQuery = mockBigQuery ;
594593
595594 RuntimeException exception = new RuntimeException ("Generic Network Failure" );
596- when (mockBigQuery .listProjects (any ( BigQuery . ProjectListOption . class ) )).thenThrow (exception );
595+ when (mockBigQuery .listProjects ()).thenThrow (exception );
597596
598597 // Verify that it throws BigQueryJdbcException
599598 BigQueryJdbcException ex =
0 commit comments