Add unit tests for PeerProtocolEngine Although not all classes have unit tests, this Closes #766 See merge request !450