Add tests for kernel impl

https://www.pivotaltracker.com/story/show/81483926