public final void testCloneWithNewIds() throws Exception {
IdGenerator nodeIdGen = new IncrementingIdGenerator();
SoyFileSetNode fileSetNode = new SoyFileSetNode(nodeIdGen.genId(), nodeIdGen);
SoyFileNode fileNode =
(new SoyFileParser(SOY_SOURCE_FOR_TESTING_CLONING, SoyFileKind.SRC, "test.soy", nodeIdGen))
.parseSoyFile();
fileSetNode.addChild(fileNode);
SoyFileSetNode clone = SoytreeUtils.cloneWithNewIds(fileSetNode);
assertEquals(1, clone.numChildren());