Added test for formatError.