updated test to use returned objects