The service that simulate server behaviour extracted to its own js file
removed obsolete code
added test assertion for location header