Updated test to use latest API