Tests of character or determination or moral impeccability are a long-standing part of fantastic literature. What's potentially more fun is when it's a secret test, or a test that's not what the hero thinks it is. Heck there are so many variations of the test or trial that there's a whole index of tropes about them. This is a great mine for adventure scenario ideas.
Just be sure to come up with some twist that isn't described on those pages, so it'll still be a surprise and not a cliché.
Luke: My own face! Aha! It was a metaphysical test after all.
Yoda: What. Did. You. Do?
Luke: So, um... Did I pass?