Merge "Fix broken unit test done by ag/1729776, and added unit test." into nyc-andromeda-dev