Add some unit tests for selective syncing