@Test
	public void testBadProperties() throws Exception {
		MessageBus bus = getMessageBus();
		Properties properties = new Properties();
		properties.put("foo", "bar");
		properties.put("baz", "qux");

		DirectChannel output = new DirectChannel();
		try {
			bus.bindProducer("badprops.0", output, properties);
		}
		catch (IllegalArgumentException e) {
			assertThat(e.getMessage(), allOf(Matchers.containsString(bus.getClass().getSimpleName().replace("Test", "")
					+ " does not support producer "),
					containsString("foo"),
					containsString("baz"),
					containsString(" for badprops.0.")));
		}

		properties.remove("baz");
		try {
			bus.bindConsumer("badprops.0", output, properties);
		}
		catch (IllegalArgumentException e) {
			assertThat(e.getMessage(), equalTo(bus.getClass().getSimpleName().replace("Test", "")
					+ " does not support consumer property: foo for badprops.0."));
		}
	}
Tests for buses that support partitioning.

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