Fix code contracts build issue
add some unit tests to ccd cam