@Test public void testGenerateContractManifestFile() throws Exception { File tempDir = Files.createTempDirectory( ContractUtils.class.getSimpleName() + "-test-generate-manifest").toFile(); tempDir.deleteOnExit(); ContractManifest cm = buildContractManifest(); generateContractManifestFile(cm, tempDir); File expectedOutputFile = Paths.get(tempDir.getAbsolutePath(), "blah" + "." + ContractUtils.MANIFEST_FILENAME_SUFFIX) .toFile(); assertTrue(expectedOutputFile.exists()); assertThat(expectedOutputFile.length(), greaterThan(0L)); ContractManifest cmLoaded = loadContractManifestFile( expectedOutputFile.getAbsolutePath()); assertThat(cmLoaded.getExtra(), not(nullValue())); assertThat(((HashMap) cmLoaded.getExtra()).get("name"), is("blah")); assertThat(((HashMap) cmLoaded.getExtra()).get("test-bool"), is(true)); assertThat(((HashMap) cmLoaded.getExtra()).get("test-int"), is(1)); }
public static String generateContractManifestFile( ContractManifest manifest, File destinationDirectory) throws IOException { String fileName = getContractManifestFilename(manifest); return generateContractManifestFile(manifest, fileName, destinationDirectory); }
ContractUtils { public static String generateContractManifestFile( ContractManifest manifest, File destinationDirectory) throws IOException { String fileName = getContractManifestFilename(manifest); return generateContractManifestFile(manifest, fileName, destinationDirectory); } }
ContractUtils { public static String generateContractManifestFile( ContractManifest manifest, File destinationDirectory) throws IOException { String fileName = getContractManifestFilename(manifest); return generateContractManifestFile(manifest, fileName, destinationDirectory); }  }
ContractUtils { public static String generateContractManifestFile( ContractManifest manifest, File destinationDirectory) throws IOException { String fileName = getContractManifestFilename(manifest); return generateContractManifestFile(manifest, fileName, destinationDirectory); }  static String generateContractManifestFile(
            ContractManifest manifest, File destinationDirectory); static String generateContractManifestFile(
            ContractManifest manifest, String fileName, File destinationDirectory); static ContractManifest loadContractManifestFile(String absoluteFilePath); static String getContractManifestFilename(ContractManifest manifest); }
ContractUtils { public static String generateContractManifestFile( ContractManifest manifest, File destinationDirectory) throws IOException { String fileName = getContractManifestFilename(manifest); return generateContractManifestFile(manifest, fileName, destinationDirectory); }  static String generateContractManifestFile(
            ContractManifest manifest, File destinationDirectory); static String generateContractManifestFile(
            ContractManifest manifest, String fileName, File destinationDirectory); static ContractManifest loadContractManifestFile(String absoluteFilePath); static String getContractManifestFilename(ContractManifest manifest);  }