@Override
	protected void obtainResource() throws Exception {
		resource = new CachingConnectionFactory("localhost");
		resource.createConnection().close();
		if (management) {
			Socket socket = SocketFactory.getDefault().createSocket("localhost", 15672);
			socket.close();
		}
	}
JUnit {@link Rule} that detects the fact that RabbitMQ is available on localhost.

@author Mark Fisher
@author Gary Russell
@author Eric Bottard
spring-xd-test/src/main/java/org/springframework/xd/test/rabbit/RabbitTestSupport.java