@Test
	public void testPartitioningWithSingleReceiver() throws Exception {
		MessageBus bus = getMessageBus();
		Properties properties = new Properties();
		properties.put("partitionKeyExtractorClass", "org.springframework.xd.dirt.integration.bus.PartitionTestSupport");
		properties.put("partitionSelectorClass", "org.springframework.xd.dirt.integration.bus.PartitionTestSupport");
		try {
			DirectChannel output = new DirectChannel();
			output.setBeanName("test.output");
			bus.bindProducer("partK.0", output, properties);
			fail();
		}
		catch (IllegalArgumentException e) {
			assertThat(e.getMessage(), Matchers.equalTo(bus.getClass().getSimpleName().replace("Test", "")
							+ " requires partitioned data to be sent to a module having 'count' > 1 for 'partK.0'"));
		}

	}
Tests for buses that support partitioning.

@author Gary Russell
spring-xd-dirt/src/test/java/org/springframework/xd/dirt/integration/bus/PartitionCapableBusTests.java