Skip to content

Incorrect migration path from verifyZeroInteractions() to verifyNoInteractions() in Mockito 3.x #630

@DivyaMaddipudi

Description

@DivyaMaddipudi

What version of OpenRewrite are you using?

I am using

  • OpenRewrite v2.21.1

How are you running OpenRewrite?

CLI

What is the smallest, simplest way to reproduce the problem?

Description:
The migration guide incorrectly recommends using verifyNoInteractions() when migrating from verifyZeroInteractions() in Mockito 2.x to Mockito >= 3.x. The correct migration path should be to use verifyNoMoreInteractions() instead, as verifyZeroInteractions() was an alias for verifyNoMoreInteractions(), not a true guarantee of zero interactions.

What did you expect to see?

The migratioN should recommend using verifyNoMoreInteractions() when migrating from verifyZeroInteractions() in Mockito 2.x to Mockito >= 3.x.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions