Generalize test script for plugins and move it here.