// synchronous transactions (instead of an asynchronous ones)
// => this way, every commit will be processed synchronously !
ScmSyncConfigurationPlugin scmSyncConfigPluginInstance = new ScmSyncConfigurationPlugin(true);
// Mocking PluginWrapper attached to current ScmSyncConfigurationPlugin instance
PluginWrapper pluginWrapper = PowerMockito.mock(PluginWrapper.class);
when(pluginWrapper.getShortName()).thenReturn("scm-sync-configuration");
// Setting field on current plugin instance
Field wrapperField = Plugin.class.getDeclaredField("wrapper");
boolean wrapperFieldAccessibility = wrapperField.isAccessible();
wrapperField.setAccessible(true);
wrapperField.set(scmSyncConfigPluginInstance, pluginWrapper);