Optimal Algorithms for Augmented Testing of Discrete Distributions