add unit tests for sheer_api
small code changes to be able to write tests
add tests