@Test
public void testCopyWithUnresolvedDependency() {

  FileStub binaryPath = new FileStub("unresolved dependency - fake", true);
  GradleModuleVersion moduleVersion = new GradleModuleVersionImpl(myModuleVersion);
  when(myOriginalDependency.getFile()).thenReturn(binaryPath);
  when(myOriginalDependency.getSource()).thenReturn(null);
  when(myOriginalDependency.getJavadoc()).thenReturn(null);
  when(myOriginalDependency.getScope()).thenReturn(null);
  when(myOriginalDependency.getGradleModuleVersion()).thenReturn(moduleVersion);
  JarLibraryDependency dependency = myIdeaJarLibraryDependencyFactory.create(myOriginalDependency);
  assertNotNull(dependency);
  assertEquals("fake", dependency.getName());
  assertNull(dependency.getScope());
  assertSame(binaryPath, dependency.getBinaryPath());
  assertNull(dependency.getSourcePath());
  assertNull(dependency.getJavadocPath());
  assertEquals(moduleVersion, dependency.getModuleVersion());
  assertFalse(dependency.isResolved());
}