@Test void testGenerate() { var map = new BlockMap(); var label = labelGenerator.generate("test"); assertEquals(map.generate(label).getLabel(), label); label = labelGenerator.generate("test"); assertNotNull(map.newBlock(label)); assertEquals(map.generate(label).getLabel(), label); assertEquals(2, map.getBlocks().size()); }
public Block generate(Label label) { var block = newBlock(label); register(block); return block; }
BlockMap { public Block generate(Label label) { var block = newBlock(label); register(block); return block; } }
BlockMap { public Block generate(Label label) { var block = newBlock(label); register(block); return block; }  }
BlockMap { public Block generate(Label label) { var block = newBlock(label); register(block); return block; }  Block generate(Label label); Block newBlock(Label label); void register(Block block); void reset(); }
BlockMap { public Block generate(Label label) { var block = newBlock(label); register(block); return block; }  Block generate(Label label); Block newBlock(Label label); void register(Block block); void reset();  }