@Test
public void testInit() {

  ConfigBuilder builder = new ConfigBuilder();
  SubsetConfiguration conf =
      builder.add("sink.roll-interval", "10m")
          .add("sink.roll-offset-interval-millis", "1")
          .add("sink.basepath", "path")
          .add("sink.ignore-error", "true")
          .add("sink.allow-append", "true")
          .add("sink.source", "src")
          .subset("sink");
  RollingFileSystemSink sink = new RollingFileSystemSink();
  sink.init(conf);
  assertEquals("The roll interval was not set correctly",
      sink.rollIntervalMillis, 600000);
  assertEquals("The roll offset interval was not set correctly",
      sink.rollOffsetIntervalMillis, 1);
  assertEquals("The base path was not set correctly",
      sink.basePath, new Path("path"));
  assertEquals("ignore-error was not set correctly",
      sink.ignoreError, true);
  assertEquals("allow-append was not set correctly",
      sink.allowAppend, true);
  assertEquals("The source was not set correctly",
      sink.source, "src");
}