public void should_support_nested_links(){
DockerImageBuildConfiguration dockerImageBuildConfiguration = new DockerImageBuildConfiguration(of("image", "ubutu",
"links", asList(of("image","mysql",
"links", asList(of("image","redis"))
)),
"command", "echo success"),"buildId", new ShellCommands());
ShellCommands shellCommands = dockerImageBuildConfiguration.toShellCommands(null);
Assert.assertEquals("docker run -d --name redis_buildId redis",shellCommands.get(0));
Assert.assertEquals("docker run -d --name mysql_buildId --link redis_buildId:redis mysql",shellCommands.get(1));
Assert.assertEquals("docker run --rm --sig-proxy=true --link mysql_buildId:mysql ubutu sh -cx \"echo success\"",shellCommands.get(2));
Assert.assertEquals("docker kill mysql_buildId",shellCommands.get(3));
Assert.assertEquals("docker rm mysql_buildId",shellCommands.get(4));
Assert.assertEquals("docker kill redis_buildId",shellCommands.get(5));
Assert.assertEquals("docker rm redis_buildId",shellCommands.get(6));
}