### Question:
SelectPostgisLayerJDialog extends CancellableDialogAdapter { public String getPassword() { char[] chars = getPasswordInputField().getValue(); if (chars == null) return null; return new String(chars); } SelectPostgisLayerJDialog(Component parentWindowComponent); @Override boolean okClose(); String getHost(); String getPort(); String getDb(); String getUsername(); String getLayer(); String getPassword(); @Override void cancel(); boolean close();  }### Answer:
@Test public void testGui() throws Throwable { if (!isInteractive()) return; SelectPostgisLayerJDialog selectPostgisLayerJDialog = new SelectPostgisLayerJDialog( null); TestingUtil.testGui(selectPostgisLayerJDialog); System.out.println(selectPostgisLayerJDialog.getPassword()); }