This question already has an answer here:
I need to mock a Logger in a @Service class to make tests. I want to verify if a logger message will be created. (SLF4J Logger)
I think I can do it using @Bean class and make the Logger a managed bean on spring.
But I need to create the logger using the .class of the injected Service too.
Somebody knows how to do it?
Aucun commentaire:
Enregistrer un commentaire