Add some tests (thanks @kategengler)