void () { MyTabsInspection inspection = new MyTabsInspection(); JComponent component = render(inspection); // Tabs var labels = UIUtil.findComponentsOfType(component, JLabel.class); assertTrue(ContainerUtil.exists(labels, label -> "Tab 1".equals(label.getText()))); assertTrue(ContainerUtil.exists(labels, label -> "Tab 2".equals(label.getText()))); // Controls inside tab panels var checkBoxes = UIUtil.findComponentsOfType(component, JCheckBox.class); assertEquals(1, checkBoxes.size()); var integerFields = UIUtil.findComponentsOfType(component, JBTextField.class); assertEquals(1, integerFields.size()); }