Job 23:10 (ESV)

10 But he knows the way that I take; when he has tried me, I shall come out as gold.

The reason why this situation (Job 23:8–9) is so frustrating to Job, is that he knows that God would have declared him innocent. God knows everything about Job, and he would have declared Job’s character to be as pure as gold.