XmlIO { public static <T> Read<T> read() { return new AutoValue_XmlIO_Read.Builder<T>() .setConfiguration( new AutoValue_XmlIO_MappingConfiguration.Builder<T>() .setCharset(StandardCharsets.UTF_8.name()) .build()) .setMinBundleSize(1L) .setCompression(Compression.AUTO) .build(); }  static Read<T> read(); static ReadFiles<T> readFiles(); static Write<T> write(); static Sink<T> sink(Class<T> recordClass);  }
@Test public void testDisplayData() { DisplayData displayData = DisplayData.from( XmlIO.<Integer>read() .from("foo.xml") .withRootElement("bird") .withRecordElement("cat") .withMinBundleSize(1234) .withRecordClass(Integer.class)); Assert.assertThat(displayData, hasDisplayItem("filePattern", "foo.xml")); Assert.assertThat(displayData, hasDisplayItem("rootElement", "bird")); Assert.assertThat(displayData, hasDisplayItem("recordElement", "cat")); Assert.assertThat(displayData, hasDisplayItem("recordClass", Integer.class)); Assert.assertThat(displayData, hasDisplayItem("minBundleSize", 1234)); }