Skip to content

@SpyBean and @MockBean fails on verify, after spring-tx is added to classpath #5837

Closed
@robersongomes

Description

@robersongomes

I'm using spring-boot 1.4.0.M2 and I having some trouble using @SpyBean and @MockBean in my tests.
Both annotations were working fine, but after I added spring-boot-starter-jdbc to my project, my tests started to fail on spy/mock verifications with:

org.mockito.exceptions.misusing.UnfinishedVerificationException:
Missing method call for verify(mock) here:

I removed spring-boot-starter-jdbc dependency and added spring-tx and the error still there.

I've created a project reproducing the issue: https://github.com/robersonccgomes/spring-boot-spybean-bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions