Add the unite tests for the previously committed updates

 The previous pull request contained only the changes without the proper unit test. This request contains the required tests and some fixes which were found after the tests was made.
 * BASE-12 - Fix the RemoteWrappedException and add unit tests
 * BASE-14 - Add unit test to test the paged search implementation
 * BASE-15 - Add unit test to confirm the Sync and the Search returns with the proper response at the end
 * BASE-16 - Add unit test and fix some bugs which were found with the tests