Fixed memory test to work with API changes