private void maybeCleanup() {
		if (resource != null) {
			try {
				cleanupResource();
			}
			catch (Exception ignored) {
				logger.warn("Exception while trying to cleanup failed resource", ignored);
			}
		}
	}
Abstract base class for JUnit {@link Rule}s that detect the presence of some external resource. If the resource is
indeed present, it will be available during the test lifecycle through {@link #getResource()}. If it is not, tests
will either fail or be skipped, depending on the value of system property {@value #XD_EXTERNAL_SERVERS_REQUIRED}.

@author Eric Bottard
@author Gary Russell
spring-xd-test/src/main/java/org/springframework/xd/test/AbstractExternalResourceTestSupport.java