Unit tests from jkelle