write test to service