fixed tests (were broken to last clustered-by commits)

also only apply id if not null (same with routing value)
added some more tests