### Question:
PanLine extends JPanel { public String getCustomWidth() { String value = textFieldWidth.getText().trim(); if (value == null || value.length() == 0) { return null; } return value; } 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 testGetCustomWidth() { JTextField textField = new JTextField(); textField.setText("5 "); Whitebox.setInternalState(panLine, "textFieldWidth", textField); String actual = panLine.getCustomWidth(); String expected = "5"; assertEquals(expected, actual); }
@Test public void testGetCustomWidthEmpty() { JTextField textField = new JTextField(); textField.setText(" "); Whitebox.setInternalState(panLine, "textFieldWidth", textField); String actual = panLine.getCustomWidth(); assertNull(actual); }