### Question:
ExecuteQueriesDelegate extends SessionDelegate { static boolean mayBeReadWrite(String cypher) { if (cypher.contains(OGM_READ_ONLY_HINT)) { return false; } Matcher matcher = WRITE_CYPHER_KEYWORDS.matcher(cypher); return matcher.find(); } ExecuteQueriesDelegate(Neo4jSession session); T queryForObject(Class<T> type, String cypher, Map<String, ?> parameters); Iterable<T> query(Class<T> type, String cypher, Map<String, ?> parameters); Result query(String cypher, Map<String, ?> parameters, boolean readOnly); long countEntitiesOfType(Class<?> entity); long count(Class<?> clazz, Iterable<Filter> filters);  }### Answer:
@Test public void test() { boolean mayBeReadWrite = ExecuteQueriesDelegate.mayBeReadWrite(query); if (isWriteQuery) { Assert.assertTrue(mayBeReadWrite); } else { Assert.assertFalse(mayBeReadWrite); } }