HashTreeBuilder implements TreeBuilder<ImprintNode> { public void add(ImprintNode node) throws HashException { addToHeads(heads, node); } HashTreeBuilder(HashAlgorithm algorithm);  HashTreeBuilder(); void add(ImprintNode node); void add(ImprintNode node, IdentityMetadata metadata); long calculateHeight(ImprintNode node); long calculateHeight(ImprintNode node, IdentityMetadata metadata); void add(ImprintNode... nodes); ImprintNode build();  }
@Test(expectedExceptions = NullPointerException.class, expectedExceptionsMessageRegExp = "Node can not be null") public void testAddMissingNode() { builder.add((ImprintNode) null); }
@Test(expectedExceptions = NullPointerException.class, expectedExceptionsMessageRegExp = "Nodes can not be null") public void testAddMissingNodes() { builder.add((ImprintNode[]) null); }