Fixed service.xml and added functional test