public static long getCount(final URL adminServer, final String name) {
		Assert.notNull(adminServer, "The admin server must be specified.");
		Assert.hasText(name, "The name must not be empty nor null");
		CounterResource resource = createSpringXDTemplate(adminServer).
				counterOperations().retrieve(name);
		return resource.getValue();
	}
Retrieves the value for the counter

@param adminServer the admin server for the cluster being tested.
@param name        the name of the counter in the metric repo.
@return the count associated with the name.
spring-xd-integration-test/src/main/java/org/springframework/xd/integration/util/StreamUtils.java