use of com.yahoo.search.query.Presentation in project vespa by vespa-engine.
the class PresentationTestCase method testClone.
public void testClone() {
Query q = new Query("");
Presentation p = new Presentation(q);
p.setBolding(true);
Highlight h = new Highlight();
h.addHighlightTerm("date", "today");
p.setHighlight(h);
Presentation pc = (Presentation) p.clone();
h.addHighlightTerm("title", "Hello");
assertTrue(pc.getBolding());
pc.getHighlight().getHighlightItems();
assertTrue(pc.getHighlight().getHighlightItems().containsKey("date"));
assertFalse(pc.getHighlight().getHighlightItems().containsKey("title"));
assertEquals(p, pc);
}
Aggregations