### Question:
PanLine extends JPanel { public void setCustomWidthUnit(EnumWidthUnit enumWidthUnit) { comboBoxWidthUnit.setSelectedItem(enumWidthUnit); } PanLine(); String getAlign(); String getThickness(); String getCustomWidth(); String getCustomWidthUnit(); String getColor(); void setAlign(EnumAlign enumAlign); void setThickness(String thickness); void setCustomWidth(String width); void setCustomWidthUnit(EnumWidthUnit enumWidthUnit); void setColor(String hexValue);  }### Answer:
@Test public void testSetCustomWidthUnit() { JComboBox comboBox = new JComboBox(); for (EnumWidthUnit enumWidthUnit : EnumWidthUnit.values()) { comboBox.addItem(enumWidthUnit); } comboBox.setSelectedIndex(0); Whitebox.setInternalState(panLine, "comboBoxWidthUnit", comboBox); panLine.setCustomWidthUnit(EnumWidthUnit.PIXEL); String actual = ((EnumWidthUnit) comboBox.getSelectedItem()).getXmlValue(); String expected = EnumWidthUnit.PIXEL.getXmlValue(); assertEquals(expected, actual); assertEquals(1, comboBox.getSelectedIndex()); }