@Override
	public void validateBeforeUndeploy(String name) {
		Assert.hasText(name, "name cannot be blank or null");

		D definition = getDefinitionRepository().findOne(name);
		if (definition == null) {
			throwNoSuchDefinitionException(name);
		}

		final I instance = instanceRepository.findOne(name);
		if (instance == null) {
			throwNotDeployedException(name);
		}
	}
Un-deploy the deployment unit with the given name

@param deploymentUnitName the deployment unit name
spring-xd-dirt/src/main/java/org/springframework/xd/dirt/stream/AbstractInstancePersistingDeployer.java