@Test
public void invNoDownload() throws Exception {

    // Don't download missing blocks.
    peer.setDownloadData(false);
    connect();
    // Make a missing block that we receive.
    Block b1 = createFakeBlock(blockStore, Block.BLOCK_HEIGHT_GENESIS).block;
    blockChain.add(b1);
    Block b2 = makeSolvedTestBlock(b1);
    // Receive an inv.
    InventoryMessage inv = new InventoryMessage(PARAMS);
    InventoryItem item = new InventoryItem(InventoryItem.Type.Block, b2.getHash());
    inv.addItem(item);
    inbound(writeTarget, inv);
    // Peer does nothing with it.
    assertNull(outbound(writeTarget));
}