Add several legacy API tests
Merge commit '24875b42f92e286a727ceb9f4a9b0c1b23977593' into HEAD