@@ -623,7 +623,6 @@ public void testGetDatasetNotFoundWhenThrowIsDisabled() throws IOException {
623
623
public void testGetDatasetNotFoundWhenThrowIsEnabled () throws IOException {
624
624
when (bigqueryRpcMock .getDatasetSkipExceptionTranslation (
625
625
PROJECT , "dataset-not-found" , EMPTY_RPC_OPTIONS ))
626
- .thenReturn (null )
627
626
.thenThrow (new BigQueryException (404 , "Dataset not found" ));
628
627
options .setThrowNotFound (true );
629
628
bigquery = options .getService ();
@@ -975,7 +974,6 @@ public void testGetTableNotFoundWhenThrowIsDisabled() throws IOException {
975
974
public void testGetTableNotFoundWhenThrowIsEnabled () throws IOException {
976
975
when (bigqueryRpcMock .getTableSkipExceptionTranslation (
977
976
PROJECT , DATASET , "table-not-found" , EMPTY_RPC_OPTIONS ))
978
- .thenReturn (null )
979
977
.thenThrow (new BigQueryException (404 , "Table not found" ));
980
978
options .setThrowNotFound (true );
981
979
bigquery = options .getService ();
@@ -3073,12 +3071,11 @@ public void testGetRoutineWithRountineId() throws IOException {
3073
3071
public void testGetRoutineWithEnabledThrowNotFoundException () throws IOException {
3074
3072
when (bigqueryRpcMock .getRoutineSkipExceptionTranslation (
3075
3073
PROJECT , DATASET , ROUTINE , EMPTY_RPC_OPTIONS ))
3076
- .thenReturn (null )
3077
3074
.thenThrow (new BigQueryException (404 , "Routine not found" ));
3078
3075
options .setThrowNotFound (true );
3079
3076
bigquery = options .getService ();
3080
3077
try {
3081
- Routine routine = bigquery .getRoutine (ROUTINE_ID );
3078
+ bigquery .getRoutine (ROUTINE_ID );
3082
3079
fail ();
3083
3080
} catch (BigQueryException ex ) {
3084
3081
assertEquals ("Routine not found" , ex .getMessage ());
0 commit comments