Added a test for daemon