Skip to content

Document that @MockBean cannot be used to mock behaviour that's called during context refresh #16333

@wilkinsona

Description

@wilkinsona

We should note in the documentation that @MockBean cannot be used to mock the behaviour of a bean that's exercised during application context refresh. It does not work as application context refresh has completed before the test gets a chance to configure the mocked behaviour.

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