SWTBotShell renameDialog = bot
.shell(UIText.BranchRenameDialog_WindowTitle);
SWTBotText newBranchNameText = renameDialog.bot().textWithLabel(UIText.BranchRenameDialog_NewNameLabel);
newBranchNameText.setText("invalid~name");
renameDialog.bot().text(" " + // the text is now in the error message, and the MessageAreaDialog seems to add a space
NLS.bind(UIText.ValidationUtils_InvalidRefNameMessage,
"refs/heads/invalid~name"));
assertFalse(renameDialog.bot().button(IDialogConstants.OK_LABEL)
.isEnabled());
newBranchNameText.setText("newmaster");