public <T extends Block> T getNext(Class<T> blockType) {
    Block block = next;
    while (block != null && !blockType.isInstance(block)) block = block.next;
    return blockType.cast(block);
  }
AST node representing a block in a feature method. There are six kinds
of blocks: setup-block, expect-block, when-block, then-block, cleanup-block,
and where-block.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/compiler/model/Block.java