@Before public void setUp() { initMocks(this); when(packageRepositoryExtension.extensionName()).thenReturn(PluginConstants.PACKAGE_MATERIAL_EXTENSION); when(scmExtension.extensionName()).thenReturn(PluginConstants.SCM_EXTENSION); when(notificationExtension.extensionName()).thenReturn(PluginConstants.NOTIFICATION_EXTENSION); when(configRepoExtension.extensionName()).thenReturn(PluginConstants.CONFIG_REPO_EXTENSION); when(taskExtension.extensionName()).thenReturn(PluginConstants.PLUGGABLE_TASK_EXTENSION); List<GoPluginExtension> extensions = asList(packageRepositoryExtension, scmExtension, notificationExtension, configRepoExtension, taskExtension); metadataLoader = new PluginSettingsMetadataLoader(extensions, pluginManager); PluginSettingsMetadataStore.getInstance().clear(); }