@Test
  public void testToBuilder() {
    Configuration config =
        Configuration.unix().toBuilder()
            .setWorkingDirectory("/hello/world")
            .setAttributeViews("basic", "posix")
            .build();

    assertThat(config.pathType).isEqualTo(PathType.unix());
    assertThat(config.roots).containsExactly("/");
    assertThat(config.workingDirectory).isEqualTo("/hello/world");
    assertThat(config.nameCanonicalNormalization).isEmpty();
    assertThat(config.nameDisplayNormalization).isEmpty();
    assertThat(config.pathEqualityUsesCanonicalForm).isFalse();
    assertThat(config.blockSize).isEqualTo(8192);
    assertThat(config.maxSize).isEqualTo(4L * 1024 * 1024 * 1024);
    assertThat(config.maxCacheSize).isEqualTo(-1);
    assertThat(config.attributeViews).containsExactly("basic", "posix");
    assertThat(config.attributeProviders).isEmpty();
    assertThat(config.defaultAttributeValues).isEmpty();
  }
Tests for {@link Configuration}, {@link Configuration.Builder} and file systems created from
them.

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