Imported tests from 5.X implementation