Generalize plugin logic (testing)