prevented catalog query from override given endpoint

Added unit tests for verifying functionality