### Question:
BitcoinSerializer extends MessageSerializer { @Override public void seekPastMagicBytes(ByteBuffer in) throws BufferUnderflowException { int magicCursor = 3; while (true) { byte b = in.get(); byte expectedByte = (byte)(0xFF & params.getPacketMagic() >>> (magicCursor * 8)); if (b == expectedByte) { magicCursor--; if (magicCursor < 0) { return; } else { } } else { magicCursor = 3; } } } BitcoinSerializer(NetworkParameters params, boolean parseRetain); @Override void serialize(String name, byte[] message, OutputStream out); @Override void serialize(Message message, OutputStream out); @Override Message deserialize(ByteBuffer in); @Override BitcoinPacketHeader deserializeHeader(ByteBuffer in); @Override Message deserializePayload(BitcoinPacketHeader header, ByteBuffer in); NetworkParameters getParameters(); @Override AddressMessage makeAddressMessage(byte[] payloadBytes, int length); @Override Message makeAlertMessage(byte[] payloadBytes); @Override Block makeBlock(final byte[] payloadBytes, final int offset, final int length); @Override Message makeBloomFilter(byte[] payloadBytes); @Override FilteredBlock makeFilteredBlock(byte[] payloadBytes); @Override InventoryMessage makeInventoryMessage(byte[] payloadBytes, int length); @Override Transaction makeTransaction(byte[] payloadBytes, int offset,
        int length, byte[] hash); @Override void seekPastMagicBytes(ByteBuffer in); @Override boolean isParseRetainMode();  }### Answer:
@Test(expected = BufferUnderflowException.class) public void testSeekPastMagicBytes() { byte[] brokenMessage = HEX.decode("000000"); MAINNET.getDefaultSerializer().seekPastMagicBytes(ByteBuffer.wrap(brokenMessage)); }
@Test(expected = BufferUnderflowException.class) public void testSeekPastMagicBytes() { byte[] brokenMessage = HEX.decode("000000"); MainNetParams.get().getDefaultSerializer().seekPastMagicBytes(ByteBuffer.wrap(brokenMessage)); }