void () { TextWithMnemonic withMnemonic = TextWithMnemonic.fromPlainTextWithIndex("hello & goodbye (X)…", 17); assertEquals(withMnemonic, TextWithMnemonic.fromMnemonicText("hello & goodbye (" + MNEMONIC + "X)…")); assertEquals("hello && goodbye (_X)…", withMnemonic.toString()); assertText(withMnemonic, "hello & goodbye…", "hello & goodbye (X)…"); assertMnemonic(withMnemonic, 17, KeyEvent.VK_X, 'X'); }