@Test public void testCanRedo() { RTextArea textArea = new RTextArea(); Assert.assertFalse(textArea.canRedo()); textArea.replaceSelection("Hi"); Assert.assertFalse(textArea.canRedo()); textArea.undoLastAction(); Assert.assertTrue(textArea.canRedo()); textArea.redoLastAction(); Assert.assertFalse(textArea.canRedo()); }