I have SpringBootTest class at which i am using TokenGenerator
class to generate real tokens
@Autowired
private TokenGenerator tokenGenerator;
Now i need to mock one method in that TokenGenerator
can i define a new mocked version of the same bean like
@MockBean
private TokenGenerator mockedTokenGenerator;
Aucun commentaire:
Enregistrer un commentaire