The judge thought he had a test case that could go up to the state Supreme Court, before it ended in a guilty plea.