This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git

commit 9cb882b5ef0504fb3682f9b1fa4a8d3698e6247d
Author: Gary Gregory <[email protected]>
AuthorDate: Thu Mar 11 09:08:11 2021 -0500

    Add tests.
---
 .../src/test/java/org/apache/commons/vfs2/VFSTest.java     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/commons-vfs2/src/test/java/org/apache/commons/vfs2/VFSTest.java 
b/commons-vfs2/src/test/java/org/apache/commons/vfs2/VFSTest.java
index d53b9c0..ecc57e4 100644
--- a/commons-vfs2/src/test/java/org/apache/commons/vfs2/VFSTest.java
+++ b/commons-vfs2/src/test/java/org/apache/commons/vfs2/VFSTest.java
@@ -17,6 +17,8 @@
 
 package org.apache.commons.vfs2;
 
+import static org.junit.Assert.assertNotEquals;
+
 import java.nio.file.Paths;
 
 import org.apache.commons.vfs2.impl.StandardFileSystemManager;
@@ -51,4 +53,16 @@ public class VFSTest {
         Assert.assertNotNull(VFS.getManager());
         Assert.assertNotEquals(fileSystemManager, VFS.getManager());
     }
+
+    @Test
+    public void testStaticClose() throws FileSystemException {
+        final FileSystemManager manager = VFS.getManager();
+        VFS.close();
+        assertNotEquals(manager, VFS.getManager());
+    }
+    @Test
+    public void testStaticCloseRepeatable() throws FileSystemException {
+        VFS.close();
+        VFS.close();
+    }
 }

Reply via email to