@Test
  public void testInitialSettings_fromConfiguration() {
    Configuration config =
        Configuration.unix().toBuilder()
            .setBlockSize(4)
            .setMaxSize(99) // not a multiple of 4
            .setMaxCacheSize(25)
            .build();

    HeapDisk disk = new HeapDisk(config);

    assertThat(disk.blockSize()).isEqualTo(4);
    assertThat(disk.getTotalSpace()).isEqualTo(96);
    assertThat(disk.getUnallocatedSpace()).isEqualTo(96);
    assertThat(disk.blockCache.blockCount()).isEqualTo(0);
  }
Tests for {@link HeapDisk}.

@author Colin Decker
jimfs/src/test/java/com/google/common/jimfs/HeapDiskTest.java