@Test
	public void testListRuntimeModulesByContainerId() {
		logger.info("Test listing of runtime modules by containerId");
		String streamName = generateStreamName();
		stream().create(streamName, "time | log");

		assertThat(2, eventually(moduleCountForStream(streamName)));

		List<TableRow> runtimeModules = getRuntimeModulesForStream(streamName);

		// Get containerId for a runtime module
		String containerId = runtimeModules.get(0).getValue(2);
		CommandResult cmdResult = executeCommand("runtime modules --containerId " + containerId);
		Table table = (Table) cmdResult.getResult();
		List<TableRow> fooStreamModules = new ArrayList<TableRow>();
		for (TableRow row : table.getRows()) {
			// Verify all the rows have the same containerId
			assertTrue(row.getValue(2).equals(containerId));
			// match by group name
			if (row.getValue(1).equals(runtimeModules.get(0).getValue(1))) {
				fooStreamModules.add(row);
			}
		}
		// Verify the module is listed for the containerId
		assertFalse(fooStreamModules.isEmpty());
	}
Runtime commands tests.

@author Ilayaperumal Gopinathan
@author Patrick Peralta
spring-xd-shell/src/test/java/org/springframework/xd/shell/command/AbstractRuntimeCommandsTests.java