There is rather a lot wrong with your text, I am sorry to say.
"I took the test...": nothing wrong with that.
"I think, I was well done." You can ask for a grilled steak to be well done, but in this context "you" is the subject of the sentence, and you think you "did well".
"I was hopeful and I hoped to pass it": OK, but stylistically it is odd to repeat the hope word. "I hoped to pass it" on its own is fine. "I was hopeful that I had passed it" is also OK.
"I shouldn't have expected it" is an idiomatic sentence, but not I think quite what you mean. I think you mean to suggest that you were surprised by the result of the test. If that is what you mean then one idiomatic way of expressing that thought is to say "I had not expected it".
You, might, however, mean to say that your hopeful expectation of passing the test was a mistake. In that case you could say "I should not have expected to pass".