### Question:
ConstructHandler implements Handler { public void addConstruct(Triple t) { constructs.add(t); query.setConstructTemplate(new Template(BasicPattern.wrap(constructs))); } ConstructHandler(Query query); void addConstruct(Triple t); void addAll(ConstructHandler handler); @Override void setVars(Map<Var, Node> values); @Override void build();  }### Answer:
@Test public void testAddConstruct() { Triple t = new Triple(NodeFactory.createURI("one"), NodeFactory.createURI("two"), NodeFactory.createURI("three")); handler.addConstruct(t); Template template = query.getConstructTemplate(); assertNotNull(template); List<Triple> lst = template.getTriples(); assertEquals(1, lst.size()); assertEquals(t, lst.get(0)); }