@Test
  public void testDiskSynchronous() {
    {
      AttributesFactory factory = new AttributesFactory();
      factory.setDiskSynchronous(true);
      RegionAttributes attrs = factory.create();
      assertEquals(true, attrs.isDiskSynchronous());
      assertEquals(true, attrs.getDiskWriteAttributes().isSynchronous());
    }
    {
      AttributesFactory factory = new AttributesFactory();
      factory.setDiskSynchronous(false);
      RegionAttributes attrs = factory.create();
      assertEquals(false, attrs.isDiskSynchronous());
      assertEquals(false, attrs.getDiskWriteAttributes().isSynchronous());
    }
    // Test backwards compat interaction with diskSync.
    // If the old apis are used then we should get the old default of async.
    {
      DiskWriteAttributesFactory dwaf = new DiskWriteAttributesFactory();
      AttributesFactory factory = new AttributesFactory();
      factory.setDiskWriteAttributes(dwaf.create());
      RegionAttributes attrs = factory.create();
      assertEquals(false, attrs.getDiskWriteAttributes().isSynchronous());
      assertEquals(false, attrs.isDiskSynchronous());
    }
    {
      AttributesFactory factory = new AttributesFactory();
      factory.setDiskDirs(new File[] {new File("").getAbsoluteFile()});
      RegionAttributes attrs = factory.create();
      assertEquals(false, attrs.getDiskWriteAttributes().isSynchronous());
      assertEquals(false, attrs.isDiskSynchronous());
    }
    {
      AttributesFactory factory = new AttributesFactory();
      factory.setDiskDirsAndSizes(new File[] {new File("").getAbsoluteFile()}, new int[] {100});
      RegionAttributes attrs = factory.create();
      assertEquals(false, attrs.getDiskWriteAttributes().isSynchronous());
      assertEquals(false, attrs.isDiskSynchronous());
    }
  }
Tests that the {@link AttributesFactory#AttributesFactory() default} attributes factory has the
advertised default configuration.
geode-core/src/test/java/org/apache/geode/cache/AttributesFactoryJUnitTest.java