### Question:
GraphConverter extends AbstractStringConverter<Graph> { @Nonnull @Override protected String getStringForm(Graph value) { StringBuilder statementsInDotFormat = new StringBuilder(); for (Statement statement : value) { statementsInDotFormat.append( String.format("\t\"<%s>\" -> \"<%s>\" [label=\"%s\"];%n", statement.getSubject().stringValue(), statement.getObject().stringValue(), statement.getPredicate().stringValue() ) ); } return String.format("digraph graphName {%n%s}%n", statementsInDotFormat); }    }### Answer:
@Test public void shouldProperlyConvertGraphToGraphVizModel() throws Exception { ValueFactory v = new ValueFactoryImpl(); Graph graph = new TreeModel(); graph.add(v.createStatement( v.createURI("http: v.createURI("http: v.createLiteral("Test label") )); graph.add(v.createStatement( v.createURI("http: v.createURI("http: v.createLiteral("Test label1") )); String stringForm = new GraphConverter().getStringForm(graph); Approvals.verify(stringForm, Paths.get("src/test/resources/approvals/shouldProperlyConvertGraphToGraphVizModel.dot")); }