added repository and query test