@Test
public void resolveInstalledExtensionDependencyOnNamespace() throws Exception
{

    String namespace = "wiki:math";
    String extensionId = "test:extension";
    ExtensionDependency extensionDependency = mock(ExtensionDependency.class);
    doThrow(ResolveException.class).when(this.coreExtensionRepository).resolve(extensionDependency);
    InstalledExtension extension = mock(InstalledExtension.class);
    when(extensionDependency.getId()).thenReturn(extensionId);
    when(this.installedExtensionRepository.getInstalledExtension(extensionId, namespace)).thenReturn(extension);
    Version version = mock(Version.class);
    when(extension.getId()).thenReturn(new ExtensionId(extensionId, version));
    VersionConstraint versionConstraint = mock(VersionConstraint.class);
    when(extensionDependency.getVersionConstraint()).thenReturn(versionConstraint);
    when(versionConstraint.containsVersion(version)).thenReturn(true);
    assertSame(extension, this.mocker.getComponentUnderTest().resolveExtension(extensionDependency, namespace));
}