Update tests and modify to match 3.0.x branch.