Passes error checking unit tests