Refactored the code to solve Test cases

Also Added JMOCK Code