void () { MyNestedControlsInspection inspection = new MyNestedControlsInspection(); JComponent component = render(inspection); // Checkbox nested controls var checkBoxes = UIUtil.findComponentsOfType(component, JCheckBox.class); assertEquals(2, checkBoxes.size()); assertFalse(checkBoxes.get(1).isEnabled(), "Nested checkbox controls should be disabled if the checkbox is disabled."); // Group nested controls var integerFields = UIUtil.findComponentsOfType(component, JBTextField.class); assertEquals(4, integerFields.size()); }