1. The boy was happy in that he has a lot of pencils.

2. He was sad in that his father passed away.

3. He was nervous in that he had to take the test.
----------------------------
I have made some sentences containing 'in that.' Are these sentences well-written?

"Because" would be better than "in that."

He was sad, because his father passed away.