void () { MockComponent label1 = new MockComponent("1"); myPanel.add(label1); MockComponent label2 = new MockComponent("2"); myPanel.add(label2); assertThat(getChildren()).containsExactly(label1, label2); }