### Question:
SerialPortInfo { public String getPortName() { return portName; } SerialPortInfo(String portName);  SerialPortInfo(String portName, String portDescription); String getPortName(); String getPortDescription(); void setPortDescription(String portDescription);  }### Answer:
@Test public final void testCreateSerialPortInfoEmptyName() { String name = ""; SerialPortInfo info = new SerialPortInfo(name); assertThat(info.getPortName(), is(equalTo(name))); }
@Test public final void testCreateSerialPortInfoValidName() { String name = "/dev/ttyS0"; SerialPortInfo info = new SerialPortInfo(name); assertThat(info.getPortName(), is(equalTo(name))); }
@Test public final void testGetPortName() { String name = "/dev/ttyS0"; String description = "This is another description"; SerialPortInfo info = new SerialPortInfo(name, description); String result = info.getPortName(); assertThat(result, is(equalTo(name))); }