Test plugs for closing off the end of a pipe