In recent times, Petrov-Galerkin schemes with optimal test function framework have presented themselves as a stable and robust technique for solving partial differential equations. These schemes are also accompanied by an inbuilt error estimator, which makes them an ideal candidate for mesh adaptation. In this paper, we present a metric-based mesh adaptation strategy utilizing this inbuilt error estimator to generate optimal hp meshes