Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem mocking restTemplate

 
Gowher Naik
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am using EasyMock for mocking and i am having problem while mocking restTemplate . My class calls "exchange" method of restTemplate which returns responseEntity<String> . Here is the method i want to test. Whenever i run the junit for this , it retuns an error message saying 7 methods expected and 5 recorded. I am using Spring 3.0.2




please suggest any solution to write a junit for this method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic