@Test
	public void testWritingDataset() throws Exception {

		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(
				"org/springframework/xd/integration/hadoop/config/DatasetOutboundChannelAdapterIntegrationTests.xml");
		MessageChannel channel = context.getBean("datasetOut", MessageChannel.class);
		channel.send(MessageBuilder.withPayload("foo").build());
		channel.send(MessageBuilder.withPayload("bar").build());
		DatasetOperations datasetOperations = context.getBean("datasetOperations", DatasetOperations.class);
		String path = context.getBean("path", String.class);
		assertTrue("Dataset path created", new File(path).exists());
		String fileSeparator = File.separator;
		assertTrue("Dataset storage created",
				new File(path + "/" + "test/" + datasetOperations.getDatasetName(String.class)).exists());
		assertTrue("Dataset metadata created",
				new File(path + "/" + "test/" + datasetOperations.getDatasetName(String.class) + "/.metadata").exists());
		context.close();
	}
@author Thomas Risberg
@author David Turanski
spring-xd-hadoop/src/test/java/org/springframework/xd/integration/hadoop/config/DatasetOutboundChannelAdapterIntegrationTests.java