Add tests

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