@Test
public void testHeaders1() throws Exception {

    BitcoinSerializer bs = new BitcoinSerializer(MainNetParams.get());
    HeadersMessage hm = (HeadersMessage) bs.deserialize(ByteBuffer.wrap(Hex.decode("f9beb4d9686561" +
            "646572730000000000520000005d4fab8101010000006fe28c0ab6f1b372c1a6a246ae6" +
            "3f74f931e8365e15a089c68d6190000000000982051fd1e4ba744bbbe680e1fee14677b" +
            "a1a3c3540bf7b1cdb606e857233e0e61bc6649ffff001d01e3629900")));
    // The first block after the genesis
    // http://blockexplorer.com/b/1
    Block block = hm.getBlockHeaders().get(0);
    String hash = block.getHashAsString();
    assertEquals(hash, "00000000839a8e6886ab5951d76f411475428afc90947ee320161bbf18eb6048");
    assertNull(block.transactions);
    assertEquals(Utils.bytesToHexString(block.getMerkleRoot().getBytes()),
            "0e3e2357e806b6cdb1f70b54c3a3a17b6714ee1f0e68bebb44a74b1efd512098");
}