add test for protocol