refactor test for devices controller
write api documentation for device controller