Unit test for service