GitPlugin implements Plugin { @Override public void define(Context context) { FS.setAsyncFileStoreAttributes(true); context.addExtensions( JGitBlameCommand.class, GitScmProvider.class, GitIgnoreCommand.class); }  @Override void define(Context context);  }
@Test public void getExtensions() { SonarRuntime runtime = mock(SonarRuntime.class); Plugin.Context context = new Plugin.Context(runtime); new GitPlugin().define(context); assertThat(context.getExtensions()).hasSize(3); }