### Question:
TreeStructure { public TreeStructure substructure(Block block) { if (!representation.allBlocks().contains(block)) { throw new IllegalArgumentException("Block " + block + " is not part of this structure"); } ImmutableMissionRepresentation.Builder builder = ImmutableMissionRepresentation.builder(block); addChildren(block, null, builder); MissionRepresentation subrepresentation = builder.build(); Set<Block> subparallelBlocks = parallelBlocks.stream() .filter(subrepresentation.allBlocks()::contains).collect(Collectors.toSet()); return new TreeStructure(subrepresentation, subparallelBlocks); } TreeStructure(MissionRepresentation representation, Set<Block> parallelBlocks); TreeStructure substructure(Block block); Optional<Block> nextBlock(Block actualBlock); List<Block> childrenOf(Block block); boolean isParallel(Block block); boolean isLeaf(Block block); Block rootBlock(); Set<Block> allBlocks(); boolean contains(Block block); MissionRepresentation missionRepresentation(); boolean isDescendantOf(Block target, Block source); Optional<Block> parentOf(Block block); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test(expected = IllegalArgumentException.class) public void testSubstructureOfUnknownBlockThrows() { STRUCTURE.substructure(Block.idAndText("unknown", "unknown")); }