hypertext.getContent().add(term1);
hypertext.getContent().add(link);
hypertext.getContent().add(term2);
new SetHypertextTextElementVisibleContentCommand(hypertext, 4, "newlink").runWithoutUnicaseCommand();
assertEquals(3, hypertext.getContent().size());
assertEquals("foo ", hypertext.getContent().get(0).getVisibleContent());
assertEquals("newlink", hypertext.getContent().get(1).getVisibleContent());
assertEquals(" bar", hypertext.getContent().get(2).getVisibleContent());
new SetHypertextTextElementVisibleContentCommand(hypertext, 5, " newbar").runWithoutUnicaseCommand();
assertEquals(3, hypertext.getContent().size());
assertEquals("foo ", hypertext.getContent().get(0).getVisibleContent());
assertEquals("newlink", hypertext.getContent().get(1).getVisibleContent());
assertEquals(" newbar", hypertext.getContent().get(2).getVisibleContent());