Corrected Logic to mark a test method as completed