Added tests for Error objects

Change-Id: Ice53e1d33302bac922a2515e2bf2296994acd1e6