[HatoholMessageBox][test] Clean up by adding a helper function.