public void disablePortIfInstancePopulated() {
    String serverInstance = serverInstanceBox.getValue();
    if ( serverInstance != null && serverInstance.length() > 0 ) {
      portNumberBox.setDisabled( true );
    } else {
      portNumberBox.setDisabled( false );
    }
  }
@Test
  public void testDisablePortIfInstancePopulated() throws Exception {
    dataHandler.getControls();
    dataHandler.disablePortIfInstancePopulated();
    // Because portNumberBox is a mock, the setDisabled() will not persist, so the above call is for branch coverage

    when( serverInstanceBox.getValue() ).thenReturn( null );
    dataHandler.disablePortIfInstancePopulated();
    assertFalse( dataHandler.portNumberBox.isDisabled() );
  }