Coverage at 100%.

Added test for error conditions.