Incorrect assertNull is applied to the value returned from a mocked method #2639
Labels
comp-codegen
Issue is related to code generator
comp-spring
Issue is related to Spring projects support
ctg-bug
Issue is a bug
Milestone
Description
assertNull is applied to the method returned value, while it's method is mocked.
assertEquals to exact value is expected.
To Reproduce
spring-petclinic
Unit tests
forPetTypeFormatter
withPetClinicApplication
configurationExpected behavior
Method
PetType$getName()
is mocked with exact return value.assertEquals
for theactualName
is expected.Actual behavior
There is failing
assertNull
foractualName
in successful test.Screenshots, logs
Environment
IntelliJ IDEA version - Community 2023.2
Project - Maven
JDK - 17
The text was updated successfully, but these errors were encountered: