void () { MyInspection inspection = new MyInspection(); JComponent component = render(inspection); var labels = UIUtil.findComponentsOfType(component, JLabel.class); // Number splitLabel assertEquals("before", labels.get(0).getText()); assertEquals("after", labels.get(1).getText()); // String splitLabel assertEquals("before", labels.get(2).getText()); assertEquals("after", labels.get(3).getText()); // Dropdown splitLabel assertEquals("before", labels.get(4).getText()); assertEquals("after", labels.get(5).getText()); }