diff --git a/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/models/builders/SpringTestClassModelBuilder.kt b/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/models/builders/SpringTestClassModelBuilder.kt index 49dc213fcf..8294a09e94 100644 --- a/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/models/builders/SpringTestClassModelBuilder.kt +++ b/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/models/builders/SpringTestClassModelBuilder.kt @@ -113,7 +113,9 @@ class SpringTestClassModelBuilder(val context: CgContext): TestClassModelBuilder is UtClassRefModel, is UtVoidModel, is UtEnumConstantModel -> {} - is UtCustomModel -> currentModel.origin?.let { collectRecursively(it.wrap(), allModels) } + is UtCustomModel -> currentModel.origin?.let { + collectRecursively(it.wrap(currentModelWrapper.modelTagName), allModels) + } is UtLambdaModel -> { currentModel.capturedValues.forEach { collectRecursively(it.wrap(), allModels) } }