I'm very new to "threading" and don't know how to use it. I did use to create a new Thread for every test case, and those threads were never terminated. Single keyword search is also working fine for me but things get messed up when I create a new keyword every time for a new thread.
Junit Test:
public class Test{
    @Test
    public static void someTest() {
        SSH ssh = new SSH();
        // test logic
        String key = "some_value from test logic";
        ssh.start(key);
    }
}
The SSH Thread:
public class SSH extends Thread {
    String key = "";
    public void run {
        ssh(key);
    }
    public SSH(String key) {
        this.key = key;
    }
    public static void ssh(String key) {
        // some logic
    }
}
 
    