Add tests
Refine test cases by checking message output