Coding Global Background
Coding Global

How to mock UUID.randomUUID().toString() in JUnit Test

Archived 2 years ago
1 messages
2 members
2 years ago
Open in Discord
D
direct_x_34
Copy Paster!

I want to mock UUID.randomUUID().toString() in the given GitHub commit (https://github.com/Rapter1990/simplebanking/commit/dbf50b28e0930978440de39c0808f5b3415b7441). I tried using ReflectionTestUtils.setField but it didn't work. How can I achieve this?

Replies (1)