public void testWritesWithRollover() throws Exception {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
"org/springframework/xd/integration/hadoop/config/HdfsOutboundChannelAdapterIntegrationTests.xml");
MessageChannel channel = context.getBean("hdfsOut", MessageChannel.class);
channel.send(MessageBuilder.withPayload("foo").build());
channel.send(MessageBuilder.withPayload("bar").build());
FileSystem fileSystem = context.getBean("hadoopFs", FileSystem.class);
String path = context.getBean("path", String.class);
context.close();
Path basepath = new Path(path + "/testdir/");
Path filepath0 = new Path(basepath, "testfile-0");