Unit tests for sepBy and resource safety