Switched assertion arguments (expected, actual; not actual, expected)
And replaced deprecated API with newer.