void () { TextWithMnemonic hello = TextWithMnemonic.parse("hello(&H)"); assertEquals("hello(_H)", hello.toString()); assertText(hello, "hello", "hello(H)"); assertMnemonic(hello, 6, KeyEvent.VK_H, 'H'); TextWithMnemonic hello2 = TextWithMnemonic.parse("hello (&H)"); assertEquals("hello (_H)", hello2.toString()); assertText(hello2, "hello", "hello (H)"); assertMnemonic(hello2, 7, KeyEvent.VK_H, 'H'); }