Added InvalidStateEception exception
Added base test case for mock