package org.jmeterplugins.protocol.http.control;

import org.apache.commons.io.FileUtils;
import org.junit.Test;

import java.io.File;

public class STSInstallerTest {
    @Test
    public void name() throws Exception {
        File self = new File(STSInstaller.class.getProtectionDomain().getCodeSource().getLocation().getFile());
        String home = self.getParentFile().getParentFile().getParent();
        File dest = new File(home + File.separator + "bin");
        dest.mkdirs();

        STSInstaller.main(new String[0]);

        FileUtils.deleteDirectory(dest);
    }
}
package org.jmeterplugins.protocol.http.control;

import org.junit.Test;

import java.io.File;

public class STSInstallerTest {
    @Test
    public void name() throws Exception {
        File self = new File(STSInstaller.class.getProtectionDomain().getCodeSource().getLocation().getFile());
        String home = self.getParentFile().getParentFile().getParent();
        File dest = new File(home + File.separator + "bin");
        dest.mkdirs();

        STSInstaller.main(new String[0]);
    }
}
--- 
+++ 
@@ -1,5 +1,6 @@
 package org.jmeterplugins.protocol.http.control;
 
+import org.apache.commons.io.FileUtils;
 import org.junit.Test;
 
 import java.io.File;
@@ -13,5 +14,7 @@
         dest.mkdirs();
 
         STSInstaller.main(new String[0]);
+
+        FileUtils.deleteDirectory(dest);
     }
 }
Make test cleanup after itself
