}
@Test
public void testParse() {
assertNull(linkParser.parse(null));
Link link = new Link();
assertEquals(link, linkParser.parse(link));
Link unique = baseDao.first(Link.class);
link.setId(unique.getId());
link = linkParser.parse(link);
assertNull(link.getReadableText());
assertNull(link.getTooltipText());
link = new Link();
link.setId(unique.getId());
link.setReadableText(new I18nText());
link.getReadableText().add(new Locale("en"), "new");
link.getReadableText().add(new Locale("es"), "nuevo");
link.setTooltipText(new I18nText());
link.getTooltipText().add(new Locale("en"), "tooltip");
link.getTooltipText().add(new Locale("es"), "etiqueta");
link = linkParser.parse(link);
assertEquals(link.getReadableText().getId(), unique.getReadableText().getId());
assertEquals("new", link.getReadableText().getData().get(0).getTranslation());
assertEquals(link.getTooltipText().getId(), unique.getTooltipText().getId());
assertEquals("etiqueta", link.getTooltipText().getData().get(1).getTranslation());
}