refactoring to spring boot restcontroller
refactoring to spring infrastructure test