### Question:
GraphNode { public void deleteProperties(IRI predicate) { if (resource instanceof BlankNodeOrIRI) { Iterator<Triple> tripleIter = graph.filter((BlankNodeOrIRI) resource, predicate, null); Collection<Triple> toDelete = new ArrayList<Triple>(); while (tripleIter.hasNext()) { Triple triple = tripleIter.next(); toDelete.add(triple); } for (Triple triple : toDelete) { graph.remove(triple); } } } GraphNode(RDFTerm resource, Graph graph); Graph getGraph(); RDFTerm getNode(); void deleteNodeContext(); ImmutableGraph getNodeContext(); Iterator<Literal> getLiterals(IRI property); int countObjects(IRI property); Iterator<RDFTerm> getObjects(IRI property); boolean hasProperty(IRI property, RDFTerm object); int countSubjects(IRI property); Iterator<BlankNodeOrIRI> getSubjects(IRI property); Iterator<IRI> getIRIObjects(IRI property); Iterator<IRI> getProperties(); Iterator<IRI> getInverseProperties(); void addProperty(IRI predicate, RDFTerm object); void addPropertyValue(IRI property, Object value); void addInverseProperty(IRI predicate, RDFTerm subject); List<RDFTerm> asList(); void deleteProperties(IRI predicate); void deleteProperty(IRI predicate, RDFTerm object); @Override String toString(); GraphNode replaceWith(BlankNodeOrIRI replacement); GraphNode replaceWith(BlankNodeOrIRI replacement, boolean checkPredicates); Iterator<GraphNode> getObjectNodes(IRI property); Iterator<GraphNode> getSubjectNodes(IRI property); @Override boolean equals(Object obj); @Override int hashCode(); Lock readLock(); Lock writeLock();  }### Answer:
@Test public void deleteAll() { Graph g = new SimpleGraph(); BlankNode bNode1 = new BlankNode() { }; BlankNode bNode2 = new BlankNode() { }; IRI property1 = new IRI("http: IRI property2 = new IRI("http: g.add(new TripleImpl(bNode1, property1, new PlainLiteralImpl("literal"))); g.add(new TripleImpl(bNode1, property1, new PlainLiteralImpl("bla bla"))); g.add(new TripleImpl(bNode1, property2, property1)); g.add(new TripleImpl(property1, property1, new PlainLiteralImpl("bla bla"))); g.add(new TripleImpl(bNode2, property1, new PlainLiteralImpl("bla bla"))); GraphNode n = new GraphNode(bNode1, g); n.deleteProperties(property1); Assert.assertEquals(3, g.size()); }