slimmed down test with spy on format and sanitize value