Add cargo test

The test added doesn't exercise this functionality, could you add one?