void () { MyExpandableFieldInspection inspection = new MyExpandableFieldInspection(); JComponent component = render(inspection); ExpandableTextField field = UIUtil.findComponentOfType(component, ExpandableTextField.class); String text = field.getText(); assertEquals("hello,world", text); }