Trapping of test particles in static and spherical space-time geometries