Implemented checking for statuscodes.

Changes made to UnitTests