I need to simulate a test scenario in which I call the getBytes() method of a String object and I get an UnsupportedEncodingException.
getBytes()
I have tried to achie
The problem is the String class in Java is marked as final, so you cannot mock is using traditional mocking frameworks. According to the Mockito FAQ, this is a limitation of that framework as well.
String