@Test(expected = Error.class)
public void testSerializeUnknownMessage() throws Exception {

    MessageSerializer serializer = MAINNET.getDefaultSerializer();
    Message unknownMessage = new Message() {
        @Override
        protected void parse() throws ProtocolException {
        }
    };
    ByteArrayOutputStream bos = new ByteArrayOutputStream(ADDRESS_MESSAGE_BYTES.length);
    serializer.serialize(unknownMessage, bos);
}