@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));
}