Protocol tests rewritten