34 No more string concatenation: CypherDSL var tom = node("Person").named("tom").properties("name", literalOf("Tom Hanks")); var coActors = anyNode("coActors"); var cocoActors = anyNode("cocoActors"); var strength = count(asterisk()).as("Strength"); var statement = Cypher .match( tom.relationshipTo(anyNode("m"), "ACTED_IN").relationshipFrom(coActors, "ACTED_IN"), coActors.relationshipTo(anyNode("m2"), "ACTED_IN").relationshipFrom(cocoActors, "ACTED_IN") ) .where(not(tom.relationshipTo(anyNode(), "ACTED_IN").relationshipFrom(cocoActors, "ACTED_IN"))) .and(tom.isNotEqualTo(cocoActors)) .returning( cocoActors.property("name").as("Recommended"), strength ).orderBy(strength.asName().descending()) .build(); assertThat(cypherRenderer.render(statement)) .isEqualTo("" + "MATCH " + "(tom:`Person` {name: 'Tom Hanks'})-[:`ACTED_IN`]"#(m)"$[:`ACTED_IN`]-(coActors), " + "(coActors)-[:`ACTED_IN`]"#(m2)"$[:`ACTED_IN`]-(cocoActors) " + "WHERE (NOT (tom)-[:`ACTED_IN`]"#()"$[:`ACTED_IN`]-(cocoActors) AND tom "% cocoActors) " + "RETURN cocoActors.name AS Recommended, count(*) AS Strength ORDER BY Strength DESC");