### Question:
MigdalorHeaderByteSerializer implements MigdalorHeaderSerializer<BaseMigdalorHeader,String> { @Override public String getRevisionAndReposition(ByteBuffer payload) { int version = payload.getInt(); if (version == PROTOCOL_VERSION){ int schemaVersionSize = payload.getInt(); byte [] stringSchema = new byte [schemaVersionSize]; payload.get(stringSchema); String schemaVersion = new String(stringSchema); return schemaVersion; }else{ LOG.error("protocol version is not the same don't know what to do"); return null; } }  @Override String getRevisionAndReposition(ByteBuffer payload); @Override byte[] wrapEvent(byte[] event, BaseMigdalorHeader header); @Override byte[] baseWrapEvent(byte[] event, String schemaRevision);  }### Answer:
@Test public void testError(){ ByteBuffer bytes = ByteBuffer.allocate(10); bytes.putInt(1); Assert.assertNull(migdalorHeaderByteSerializer.getRevisionAndReposition(bytes)); }