web api mapping and test refactoring