Tests for retrieve