[Test] Organize test code.
[Test] Use ErrorString instead of NSError.