@Test
public void getExtensionsByType() {

    AbstractPluginManager pluginManager = mock(AbstractPluginManager.class, CALLS_REAL_METHODS);
    ExtensionFinder extensionFinder = mock(ExtensionFinder.class);
    List<ExtensionWrapper<TestExtensionPoint>> extensionList = new ArrayList<>(1);
    extensionList.add(new ExtensionWrapper<>(new ExtensionDescriptor(0, TestExtension.class), new DefaultExtensionFactory()));
    when(extensionFinder.find(TestExtensionPoint.class)).thenReturn(extensionList);
    pluginManager.extensionFinder = extensionFinder;
    List<TestExtensionPoint> extensions = pluginManager.getExtensions(TestExtensionPoint.class);
    assertEquals(1, extensions.size());
}