diff --git a/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemTest.java b/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemTest.java index 301a8807..f378f7aa 100644 --- a/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemTest.java +++ b/google-cloud-nio/src/test/java/com/google/cloud/storage/contrib/nio/CloudStorageFileSystemTest.java @@ -338,7 +338,7 @@ public void testDeleteRecursive() throws IOException { } @Test - public void testSameProvider() { + public void testSameProvider() throws IOException { try (CloudStorageFileSystem sourceFileSystem = CloudStorageFileSystem.forBucket( "bucket", @@ -351,13 +351,11 @@ public void testSameProvider() { assertEquals(sourceFileSystem.config(), destFileSystem.config()); assertEquals("bucket", sourceFileSystem.bucket()); assertEquals("new-bucket", destFileSystem.bucket()); - } catch (IOException e) { - } } @Test - public void testDifferentProvider() { + public void testDifferentProvider() throws IOException { try (CloudStorageFileSystem sourceFileSystem = CloudStorageFileSystem.forBucket( "bucket", @@ -370,8 +368,6 @@ public void testDifferentProvider() { assertNotEquals(sourceFileSystem.config(), destFileSystem.config()); assertEquals("bucket", sourceFileSystem.bucket()); assertEquals("new-bucket", destFileSystem.bucket()); - } catch (IOException e) { - // fail } } /**