public String upload(String name, ModuleType type, File file) {
		String escapedPath = file.getAbsolutePath().replace("\\", "\\\\");
		CommandResult result = shell.executeCommand(String.format("module upload --type %s --name %s --file '%s'", type, name, escapedPath));
		assertNotNull("Module upload apparently failed. Exception is: " + result.getException(),
				result.getResult());
		Matcher matcher = UPLOAD_SUCCESS_PATTERN.matcher((CharSequence) result.getResult());
		assertTrue("Module upload apparently failed: " + result.getResult(), matcher.matches());
		String key = matcher.group(1) + ":" + matcher.group(2);
		modules.add(key);
		return key;
	}
Remembers created modules, in the form <type>:<name>.
spring-xd-shell/src/test/java/org/springframework/xd/shell/command/ModuleTemplate.java