@Test
 public void canConvert() {
   assertThat(
       externalModuleDependencyDescriptorFactory.canConvert(context.mock(ProjectDependency.class)),
       Matchers.equalTo(false));
   assertThat(
       externalModuleDependencyDescriptorFactory.canConvert(
           context.mock(ExternalModuleDependency.class)),
       Matchers.equalTo(true));
 }
 @Test
 public void testAddWithNullGroupAndNullVersionShouldHaveEmptyStringModuleRevisionValues() {
   ModuleDependency dependency =
       new DefaultExternalModuleDependency(null, "gradle-core", null, TEST_DEP_CONF);
   DefaultDependencyDescriptor dependencyDescriptor =
       externalModuleDependencyDescriptorFactory.createDependencyDescriptor(
           TEST_CONF, dependency, moduleDescriptor);
   assertThat(
       dependencyDescriptor.getDependencyRevisionId(),
       equalTo(IvyUtil.createModuleRevisionId(dependency)));
 }
  @Test
  public void testCreateFromModuleDependency() {
    DefaultExternalModuleDependency moduleDependency =
        new DefaultExternalModuleDependency("org.gradle", "gradle-core", "1.0", TEST_DEP_CONF);
    setUpDependency(moduleDependency);

    DefaultDependencyDescriptor dependencyDescriptor =
        externalModuleDependencyDescriptorFactory.createDependencyDescriptor(
            TEST_CONF, moduleDependency, moduleDescriptor);

    assertEquals(moduleDependency.isChanging(), dependencyDescriptor.isChanging());
    assertEquals(dependencyDescriptor.isForce(), moduleDependency.isForce());
    assertEquals(
        IvyUtil.createModuleRevisionId(moduleDependency),
        dependencyDescriptor.getDependencyRevisionId());
    assertDependencyDescriptorHasCommonFixtureValues(dependencyDescriptor);
  }