@Test
  public void testAddAndGet() {
    file.addBlock(new byte[] {1});

    assertThat(file.blockCount()).isEqualTo(1);
    assertThat(Bytes.asList(file.getBlock(0))).isEqualTo(Bytes.asList(new byte[] {1}));
    assertThat(file.getBlock(1)).isNull();

    file.addBlock(new byte[] {1, 2});

    assertThat(file.blockCount()).isEqualTo(2);
    assertThat(Bytes.asList(file.getBlock(1))).isEqualTo(Bytes.asList(new byte[] {1, 2}));
    assertThat(file.getBlock(2)).isNull();
  }
Tests for the lower-level operations dealing with the blocks of a {@link RegularFile}.

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