dereference patterns, generators & tests