Added implementation of __handleResponse() and simple test case