Here's a breakdown:
* Infinitive phrase: "to finish my test" (consists of the infinitive "to finish" and its object "my test")
* Adverbial phrase: It answers the question "Why am I happy?"
* Modification: It explains the reason for the speaker's happiness, which is completing the test.
So, the sentence means the speaker is happy *because* they are able to finish their test.