From b469f93f68d7d71d5012efc81e980500e5cdb61c Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Tue, 4 Jul 2023 16:04:05 +0300 Subject: [PATCH 1/4] First working autotests for Spring --- settings.gradle.kts | 4 + utbot-framework-test/build.gradle | 1 + utbot-spring-sample/build.gradle | 19 +++++ .../examples/spring/autowiring/Order.java | 24 ++++++ .../spring/autowiring/OrderRepository.java | 6 ++ .../spring/autowiring/OrderService.java | 21 +++++ utbot-spring-test/build.gradle | 35 ++++++++ .../spring/autowiring/OrderServiceTests.kt | 62 ++++++++++++++ .../utils/SpringTestingConfiguration.kt | 17 ++++ .../src/test/resources/log4j2.xml | 36 +++++++++ .../testing/TestCodeGeneratorPipeline.kt | 10 +-- .../utbot/testing/UtModelTestCaseChecker.kt | 2 +- .../utbot/testing/UtValueTestCaseChecker.kt | 80 ++++++++++++++++++- 13 files changed, 310 insertions(+), 7 deletions(-) create mode 100644 utbot-spring-sample/build.gradle create mode 100644 utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/Order.java create mode 100644 utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/OrderRepository.java create mode 100644 utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/OrderService.java create mode 100644 utbot-spring-test/build.gradle create mode 100644 utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/autowiring/OrderServiceTests.kt create mode 100644 utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/utils/SpringTestingConfiguration.kt create mode 100644 utbot-spring-test/src/test/resources/log4j2.xml diff --git a/settings.gradle.kts b/settings.gradle.kts index 271da68f29..aa4bc94058 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -73,3 +73,7 @@ if (goIde.split(",").contains(ideType)) { include("utbot-spring-analyzer") include("utbot-spring-commons") include("utbot-spring-commons-api") + +include("utbot-spring-sample") +include("utbot-spring-test") + diff --git a/utbot-framework-test/build.gradle b/utbot-framework-test/build.gradle index 4da265fb89..ecdca17ee3 100644 --- a/utbot-framework-test/build.gradle +++ b/utbot-framework-test/build.gradle @@ -8,6 +8,7 @@ dependencies { implementation(project(":utbot-framework")) testImplementation project(':utbot-sample') + testImplementation project(':utbot-spring-sample') testImplementation project(":utbot-framework").sourceSets.test.output testImplementation project(":utbot-core").sourceSets.test.output diff --git a/utbot-spring-sample/build.gradle b/utbot-spring-sample/build.gradle new file mode 100644 index 0000000000..d7a9bf82fa --- /dev/null +++ b/utbot-spring-sample/build.gradle @@ -0,0 +1,19 @@ +plugins { + id 'java-library' +} + +dependencies { + implementation(project(":utbot-api")) + + implementation 'org.projectlombok:lombok:1.18.20' + annotationProcessor 'org.projectlombok:lombok:1.18.20' + + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-web', version: springBootVersion + implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: springBootVersion +} + +configurations { + all { + exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' + } +} \ No newline at end of file diff --git a/utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/Order.java b/utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/Order.java new file mode 100644 index 0000000000..da6c4e40dc --- /dev/null +++ b/utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/Order.java @@ -0,0 +1,24 @@ +package org.utbot.examples.spring.autowiring; + +import lombok.*; +import lombok.extern.jackson.Jacksonized; + +import javax.persistence.*; + +@Getter +@Setter +@Builder +@ToString +@Jacksonized +@NoArgsConstructor +@AllArgsConstructor +@Entity +@Table(name = "orders") +public class Order { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + Long id; + String buyer; + Double price; + int qty; +} diff --git a/utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/OrderRepository.java b/utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/OrderRepository.java new file mode 100644 index 0000000000..a9c614a780 --- /dev/null +++ b/utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/OrderRepository.java @@ -0,0 +1,6 @@ +package org.utbot.examples.spring.autowiring; + +import org.springframework.data.jpa.repository.JpaRepository; + +public interface OrderRepository extends JpaRepository { +} diff --git a/utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/OrderService.java b/utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/OrderService.java new file mode 100644 index 0000000000..5b8960d4aa --- /dev/null +++ b/utbot-spring-sample/src/main/java/org/utbot/examples/spring/autowiring/OrderService.java @@ -0,0 +1,21 @@ +package org.utbot.examples.spring.autowiring; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service +public class OrderService { + + @Autowired + private OrderRepository orderRepository; + + public List getOrders() { + return orderRepository.findAll(); + } + + public Order createOrder(Order order) { + return orderRepository.save(order); + } +} diff --git a/utbot-spring-test/build.gradle b/utbot-spring-test/build.gradle new file mode 100644 index 0000000000..b88f00808d --- /dev/null +++ b/utbot-spring-test/build.gradle @@ -0,0 +1,35 @@ +dependencies { + api project(':utbot-framework-api') + implementation(project(":utbot-framework")) + + testImplementation project(':utbot-testing') + testImplementation project(':utbot-spring-sample') + testImplementation project(":utbot-framework").sourceSets.test.output + testImplementation project(":utbot-core").sourceSets.test.output + + // To use JUnit4, comment out JUnit5 and uncomment JUnit4 dependencies here. Please also check "test" section + // testImplementation group: 'junit', name: 'junit', version: '4.13.1' + testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-params', version: '5.8.1' + testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: '5.8.1' + + // used for testing code generation + testImplementation group: 'junit', name: 'junit', version: junit4Version + testImplementation group: 'org.junit.platform', name: 'junit-platform-console-standalone', version: junit4PlatformVersion + testImplementation group: 'org.mockito', name: 'mockito-core', version: mockitoVersion + testImplementation group: 'org.mockito', name: 'mockito-inline', version: mockitoInlineVersion + testImplementation group: 'org.jacoco', name: 'org.jacoco.report', version: jacocoVersion + + testImplementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: springBootVersion +} + +configurations { + all { + exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' + } +} + +test { + if (System.getProperty('DEBUG', 'false') == 'true') { + jvmArgs '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009' + } +} diff --git a/utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/autowiring/OrderServiceTests.kt b/utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/autowiring/OrderServiceTests.kt new file mode 100644 index 0000000000..a2cb392e76 --- /dev/null +++ b/utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/autowiring/OrderServiceTests.kt @@ -0,0 +1,62 @@ +package org.utbot.examples.spring.autowiring + +import org.junit.jupiter.api.Test +import org.utbot.examples.spring.utils.springAdditionalDependencies +import org.utbot.examples.spring.utils.standardSpringTestingConfigurations +import org.utbot.framework.plugin.api.MockStrategyApi +import org.utbot.testcheckers.eq +import org.utbot.testing.* +import kotlin.reflect.full.functions +import kotlin.reflect.KFunction1 +import kotlin.reflect.KFunction2 + +internal class OrderServiceTests : UtValueTestCaseChecker( + testClass = OrderService::class, + configurations = standardSpringTestingConfigurations +) { + @Test + fun testGetOrders() { + checkMocks( + method = OrderService::getOrders, + branches = eq(1), + { mocks, r -> + val orderRepository = mocks.singleMock("orderRepository", findAllRepositoryCall) + orderRepository.value?>(0) == r + }, + coverage = DoNotCalculate, + mockStrategy = MockStrategyApi.OTHER_CLASSES, + additionalDependencies = springAdditionalDependencies, + ) + } + + @Test + fun testCreateOrder() { + checkMocksWithExceptions( + method = OrderService::createOrder, + // TODO: replace with `branches = eq(1)` after fix of https://github.com/UnitTestBot/UTBotJava/issues/2367 + branches = ignoreExecutionsNumber, + { _: Order?, mocks, r: Result -> + val orderRepository = mocks.singleMock("orderRepository", saveRepositoryCall) + orderRepository.value(0) == r.getOrNull() + }, + coverage = DoNotCalculate, + mockStrategy = MockStrategyApi.OTHER_CLASSES, + additionalDependencies = springAdditionalDependencies, + ) + } + + @Suppress("UNCHECKED_CAST") + private val findAllRepositoryCall: KFunction1?> = + OrderRepository::class + .functions + .single { it.name == "findAll" && it.parameters.size == 1 } + as KFunction1?> + + + @Suppress("UNCHECKED_CAST") + private val saveRepositoryCall: KFunction2 = + OrderRepository::class + .functions + .single { it.name == "save" && it.parameters.size == 2 } + as KFunction2 +} \ No newline at end of file diff --git a/utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/utils/SpringTestingConfiguration.kt b/utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/utils/SpringTestingConfiguration.kt new file mode 100644 index 0000000000..63f83be1c2 --- /dev/null +++ b/utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/utils/SpringTestingConfiguration.kt @@ -0,0 +1,17 @@ +package org.utbot.examples.spring.utils + +import org.springframework.data.jpa.repository.JpaRepository +import org.springframework.data.repository.PagingAndSortingRepository +import org.utbot.framework.codegen.domain.ParametrizedTestSource +import org.utbot.framework.plugin.api.CodegenLanguage +import org.utbot.testing.SpringConfiguration +import org.utbot.testing.TestExecution + +val standardSpringTestingConfigurations: List = listOf( + SpringConfiguration(CodegenLanguage.JAVA, ParametrizedTestSource.DO_NOT_PARAMETRIZE, TestExecution) +) + +val springAdditionalDependencies: Array> = arrayOf( + JpaRepository::class.java, + PagingAndSortingRepository::class.java, +) \ No newline at end of file diff --git a/utbot-spring-test/src/test/resources/log4j2.xml b/utbot-spring-test/src/test/resources/log4j2.xml new file mode 100644 index 0000000000..ac3d2f2abf --- /dev/null +++ b/utbot-spring-test/src/test/resources/log4j2.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utbot-testing/src/main/kotlin/org/utbot/testing/TestCodeGeneratorPipeline.kt b/utbot-testing/src/main/kotlin/org/utbot/testing/TestCodeGeneratorPipeline.kt index eb105a23b1..b43a4c5453 100644 --- a/utbot-testing/src/main/kotlin/org/utbot/testing/TestCodeGeneratorPipeline.kt +++ b/utbot-testing/src/main/kotlin/org/utbot/testing/TestCodeGeneratorPipeline.kt @@ -40,14 +40,14 @@ class TestCodeGeneratorPipeline(private val testInfrastructureConfiguration: Tes private fun runPipelinesStages(classPipeline: ClassPipeline): CodeGenerationResult { val classUnderTest = classPipeline.stageContext.classUnderTest - val classPipelineName = - classUnderTest.qualifiedName ?: error("${classUnderTest.simpleName} doesn't have a fqn name") + val classPipelineName = classUnderTest.qualifiedName + ?: error("${classUnderTest.simpleName} doesn't have a fqn name") logger .info() .measureTime({ "Executing code generation tests for [$classPipelineName]" }) { CodeGeneration.verifyPipeline(classPipeline)?.let { - withUtContext(UtContext(it.stageContext.classUnderTest.java.classLoader)) { + withUtContext(UtContext(classUnderTest.java.classLoader)) { processCodeGenerationStage(it) } } @@ -86,13 +86,13 @@ class TestCodeGeneratorPipeline(private val testInfrastructureConfiguration: Tes val prefix = when (codegenLanguage) { CodegenLanguage.JAVA -> when (parametrizedTestSource) { - ParametrizedTestSource.DO_NOT_PARAMETRIZE -> "public void " + ParametrizedTestSource.DO_NOT_PARAMETRIZE -> "@Test" ParametrizedTestSource.PARAMETRIZE -> "public void parameterizedTestsFor" } CodegenLanguage.KOTLIN -> when (parametrizedTestSource) { - ParametrizedTestSource.DO_NOT_PARAMETRIZE -> "fun " + ParametrizedTestSource.DO_NOT_PARAMETRIZE -> "@Test" ParametrizedTestSource.PARAMETRIZE -> "fun parameterizedTestsFor" } } diff --git a/utbot-testing/src/main/kotlin/org/utbot/testing/UtModelTestCaseChecker.kt b/utbot-testing/src/main/kotlin/org/utbot/testing/UtModelTestCaseChecker.kt index 1d4667ff65..8297859d49 100644 --- a/utbot-testing/src/main/kotlin/org/utbot/testing/UtModelTestCaseChecker.kt +++ b/utbot-testing/src/main/kotlin/org/utbot/testing/UtModelTestCaseChecker.kt @@ -42,7 +42,7 @@ import kotlin.reflect.KFunction3 abstract class UtModelTestCaseChecker( testClass: KClass<*>, testCodeGeneration: Boolean = true, - configurations: List = standardTestingConfigurations, + configurations: List = standardTestingConfigurations, ) : CodeGenerationIntegrationTest(testClass, testCodeGeneration, configurations) { protected fun check( method: KFunction2<*, *, *>, diff --git a/utbot-testing/src/main/kotlin/org/utbot/testing/UtValueTestCaseChecker.kt b/utbot-testing/src/main/kotlin/org/utbot/testing/UtValueTestCaseChecker.kt index 951aeb3a0f..37ad0f65ec 100644 --- a/utbot-testing/src/main/kotlin/org/utbot/testing/UtValueTestCaseChecker.kt +++ b/utbot-testing/src/main/kotlin/org/utbot/testing/UtValueTestCaseChecker.kt @@ -61,7 +61,7 @@ import kotlin.reflect.KFunction5 abstract class UtValueTestCaseChecker( testClass: KClass<*>, testCodeGeneration: Boolean = true, - configurations: List = standardTestingConfigurations, + configurations: List = standardTestingConfigurations, ) : CodeGenerationIntegrationTest(testClass, testCodeGeneration, configurations) { // contains already analyzed by the engine methods private val analyzedMethods: MutableMap = mutableMapOf() @@ -530,6 +530,81 @@ abstract class UtValueTestCaseChecker( additionalMockAlwaysClasses = additionalMockAlwaysClasses ) + protected inline fun checkMocksWithExceptions( + method: KFunction1<*, R>, + branches: ExecutionsNumberMatcher, + vararg matchers: (Mocks, Result) -> Boolean, + coverage: CoverageMatcher = Full, + mockStrategy: MockStrategyApi = NO_MOCKS, + additionalDependencies: Array> = emptyArray(), + additionalMockAlwaysClasses: Set = emptySet() + ) = internalCheck( + method, mockStrategy, branches, matchers, coverage, + arguments = ::withMocksAndExceptions, + additionalDependencies = additionalDependencies, + additionalMockAlwaysClasses = additionalMockAlwaysClasses + ) + + protected inline fun checkMocksWithExceptions( + method: KFunction2<*, T, R>, + branches: ExecutionsNumberMatcher, + vararg matchers: (T, Mocks, Result) -> Boolean, + coverage: CoverageMatcher = Full, + mockStrategy: MockStrategyApi = NO_MOCKS, + additionalDependencies: Array> = emptyArray(), + additionalMockAlwaysClasses: Set = emptySet() + ) = internalCheck( + method, mockStrategy, branches, matchers, coverage, T::class, + arguments = ::withMocksAndExceptions, + additionalDependencies = additionalDependencies, + additionalMockAlwaysClasses = additionalMockAlwaysClasses + ) + + protected inline fun checkMocksWithExceptions( + method: KFunction3<*, T1, T2, R>, + branches: ExecutionsNumberMatcher, + vararg matchers: (T1, T2, Mocks, Result) -> Boolean, + coverage: CoverageMatcher = Full, + mockStrategy: MockStrategyApi = NO_MOCKS, + additionalDependencies: Array> = emptyArray(), + additionalMockAlwaysClasses: Set = emptySet() + ) = internalCheck( + method, mockStrategy, branches, matchers, coverage, T1::class, T2::class, + arguments = ::withMocksAndExceptions, + additionalDependencies = additionalDependencies, + additionalMockAlwaysClasses = additionalMockAlwaysClasses + ) + + protected inline fun checkMocksWithExceptions( + method: KFunction4<*, T1, T2, T3, R>, + branches: ExecutionsNumberMatcher, + vararg matchers: (T1, T2, T3, Mocks, Result) -> Boolean, + coverage: CoverageMatcher = Full, + mockStrategy: MockStrategyApi = NO_MOCKS, + additionalDependencies: Array> = emptyArray(), + additionalMockAlwaysClasses: Set = emptySet() + ) = internalCheck( + method, mockStrategy, branches, matchers, coverage, T1::class, T2::class, T3::class, + arguments = ::withMocksAndExceptions, + additionalDependencies = additionalDependencies, + additionalMockAlwaysClasses = additionalMockAlwaysClasses + ) + + protected inline fun checkMocksWithExceptions( + method: KFunction5<*, T1, T2, T3, T4, R>, + branches: ExecutionsNumberMatcher, + vararg matchers: (T1, T2, T3, T4, Mocks, Result) -> Boolean, + coverage: CoverageMatcher = Full, + mockStrategy: MockStrategyApi = NO_MOCKS, + additionalDependencies: Array> = emptyArray(), + additionalMockAlwaysClasses: Set = emptySet() + ) = internalCheck( + method, mockStrategy, branches, matchers, coverage, T1::class, T2::class, T3::class, T4::class, + arguments = ::withMocksAndExceptions, + additionalDependencies = additionalDependencies, + additionalMockAlwaysClasses = additionalMockAlwaysClasses + ) + // check paramsBefore, mocks and instrumentation and result value protected inline fun checkMocksAndInstrumentation( method: KFunction1<*, R>, @@ -2232,6 +2307,9 @@ fun withMocks(ex: UtValueExecution<*>) = ex.paramsBefore + listOf(ex.mocks) + ex fun withMocksAndInstrumentation(ex: UtValueExecution<*>) = ex.paramsBefore + listOf(ex.mocks) + listOf(ex.instrumentation) + ex.evaluatedResult +fun withMocksAndExceptions(ex: UtValueExecution<*>) = + ex.paramsBefore + listOf(ex.mocks) + ex.returnValue + fun withMocksInstrumentationAndThis(ex: UtValueExecution<*>) = listOf(ex.callerBefore) + ex.paramsBefore + listOf(ex.mocks) + listOf(ex.instrumentation) + ex.evaluatedResult From e52920803e3975e632918b605c5bb4a56ad10604 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Fri, 7 Jul 2023 15:43:45 +0300 Subject: [PATCH 2/4] Clean gradle script --- utbot-spring-test/build.gradle | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/utbot-spring-test/build.gradle b/utbot-spring-test/build.gradle index b88f00808d..c186b9c6e8 100644 --- a/utbot-spring-test/build.gradle +++ b/utbot-spring-test/build.gradle @@ -1,11 +1,7 @@ dependencies { - api project(':utbot-framework-api') - implementation(project(":utbot-framework")) - + testImplementation(project(":utbot-framework")) testImplementation project(':utbot-testing') testImplementation project(':utbot-spring-sample') - testImplementation project(":utbot-framework").sourceSets.test.output - testImplementation project(":utbot-core").sourceSets.test.output // To use JUnit4, comment out JUnit5 and uncomment JUnit4 dependencies here. Please also check "test" section // testImplementation group: 'junit', name: 'junit', version: '4.13.1' From d4883b7d7afc9633b1dd4dbac4844ee00aaf7d98 Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Fri, 7 Jul 2023 16:02:03 +0300 Subject: [PATCH 3/4] Apply review fixes --- utbot-framework-test/build.gradle | 3 ++- utbot-spring-sample/build.gradle | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/utbot-framework-test/build.gradle b/utbot-framework-test/build.gradle index ecdca17ee3..eea8967eb1 100644 --- a/utbot-framework-test/build.gradle +++ b/utbot-framework-test/build.gradle @@ -8,7 +8,6 @@ dependencies { implementation(project(":utbot-framework")) testImplementation project(':utbot-sample') - testImplementation project(':utbot-spring-sample') testImplementation project(":utbot-framework").sourceSets.test.output testImplementation project(":utbot-core").sourceSets.test.output @@ -47,6 +46,8 @@ dependencies { implementation group: 'com.github.UnitTestBot.ksmt', name: 'ksmt-z3', version: ksmtVersion } +// This is required to avoid conflict between SpringBoot standard logger and the logger of our project. +// See https://stackoverflow.com/a/28735604 for more details. test { if (System.getProperty('DEBUG', 'false') == 'true') { jvmArgs '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=9009' diff --git a/utbot-spring-sample/build.gradle b/utbot-spring-sample/build.gradle index d7a9bf82fa..39c94e0460 100644 --- a/utbot-spring-sample/build.gradle +++ b/utbot-spring-sample/build.gradle @@ -12,6 +12,8 @@ dependencies { implementation group: 'org.springframework.boot', name: 'spring-boot-starter-data-jpa', version: springBootVersion } +// This is required to avoid conflict between SpringBoot standard logger and the logger of our project. +// See https://stackoverflow.com/a/28735604 for more details. configurations { all { exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' From c9fcacb340a768089d35385fb3039ce575ee672f Mon Sep 17 00:00:00 2001 From: Egor Kulikov Date: Fri, 7 Jul 2023 16:05:08 +0300 Subject: [PATCH 4/4] Style corrections --- .../org/utbot/examples/spring/autowiring/OrderServiceTests.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/autowiring/OrderServiceTests.kt b/utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/autowiring/OrderServiceTests.kt index a2cb392e76..36fe8e0689 100644 --- a/utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/autowiring/OrderServiceTests.kt +++ b/utbot-spring-test/src/test/kotlin/org/utbot/examples/spring/autowiring/OrderServiceTests.kt @@ -21,7 +21,7 @@ internal class OrderServiceTests : UtValueTestCaseChecker( branches = eq(1), { mocks, r -> val orderRepository = mocks.singleMock("orderRepository", findAllRepositoryCall) - orderRepository.value?>(0) == r + orderRepository.value?>() == r }, coverage = DoNotCalculate, mockStrategy = MockStrategyApi.OTHER_CLASSES, @@ -37,7 +37,7 @@ internal class OrderServiceTests : UtValueTestCaseChecker( branches = ignoreExecutionsNumber, { _: Order?, mocks, r: Result -> val orderRepository = mocks.singleMock("orderRepository", saveRepositoryCall) - orderRepository.value(0) == r.getOrNull() + orderRepository.value() == r.getOrNull() }, coverage = DoNotCalculate, mockStrategy = MockStrategyApi.OTHER_CLASSES,