Replaced if with assertion for tests
Try a different coding style to help debug travis-ci