Add unittest for cloudsync.