JSON writer unit tests.