Dependency { public DependencyFile makeDependencyFile(final File file) { try { return new DependencyFile(file, getFileName(), getDestination(), getType(), getIvyCoordinates(), getSHA1()); } catch (InvalidHashException e) { throw new RuntimeException("InvalidHashException when copying dependency."); } } Dependency(final String fileName, final String destination, final String type, final String ivyCoordinates,
      final String sha1);  Dependency(final Map<String, String> fieldMap); Dependency copy(); DependencyFile makeDependencyFile(final File file); @JsonProperty("file") String getFileName(); String getDestination(); String getType(); String getIvyCoordinates(); String getSHA1(); @Override boolean equals(final Object o); @Override int hashCode();  }
@Test public void testMakeDependencyFile() throws Exception { Dependency depA = ThinArchiveTestUtils.getDepA(); File file = TEMP_DIR.newFile(depA.getFileName()); DependencyFile depFile = depA.makeDependencyFile(file); assertEquals(depA, depFile.copy()); assertEquals(depFile.getFile(), file); }