[2306.11085] Minimax optimal testing by classification