Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service Bus Client Mock Bean creation #432

Open
nitinagrawal89 opened this issue Feb 15, 2024 · 0 comments
Open

Service Bus Client Mock Bean creation #432

nitinagrawal89 opened this issue Feb 15, 2024 · 0 comments

Comments

@nitinagrawal89
Copy link

We are writing integration test as part of the application. This integration test is not supposed to send any data over wire. So, there is need to mock the ServiceBusSenderAsyncClient. Application is using Micronaut framework. Micronaut provides MockBean annotation to create the MockBean. Below is the error when using MockBean :

Cannot apply AOP advice to final class. Class must be made non-final to support proxying: com.azure.messaging.servicebus.ServiceBusSenderAsyncClient

Actual Behaviour

  1. Error received : Cannot apply AOP advice to final class. Class must be made non-final to support proxying: com.azure.messaging.servicebus.ServiceBusSenderAsyncClient

Expected Behaviour

  1. The ServiceBusSenderAsyncClient should be successfully mocked and integration test should pass.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant