Apply code formatting.
(cherry picked from commit 842ba5a168481b3394b93d3bf16d5581170dfe33)
Update unit tests.
(cherry picked from commit 0c4212faf09651980bd66185b4473e0a74c1f143)