Mocking objects is not a new concept  especially when you want to test classes which refers complex objects you will end up constructing these objects by hard coded values! There are many open source frameworks available for mocking objects in your test classes  but here I am going to explain how we can mock your WebService client