Decoupled and updated unit tests for PluginManager