Added testcode for threaded plugin server