Added tests for cas

All tests pass.