Add some self-contained tests