Quantcast
Channel: Spring beans redefinition in unit test environment - Stack Overflow
Viewing all articles
Browse latest Browse all 14

Answer by luboskrnac for Spring beans redefinition in unit test environment

$
0
0

You do not need to use any test contexts (doesn't matter is XML or Java based). Since Spring boot 1.4 there is available new annotation @MockBean which introduced native support for mocking and Spying of Spring Beans.


Viewing all articles
Browse latest Browse all 14

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>