Unit tests for service