helper method to replace the container to its uuid

Tests are passed with Travis.