Added spec for success case
Moved hash object related methods into a separate module