public static QueryBuilder query(final String query) {
        return new QueryBuilder() {
            protected Query makeQueryObject(EntityManager entityManager) {
                return entityManager.createQuery(query);
            }

            @Override
            public String toString() {
                return "Query: " + query + getParameterDescription();
            }
        };
    }
@Test
    public void testQueryBuilder() {
        QueryBuilder q = QueryBuilder.query("select x from SendEmail x");
        assertNotNull(q);
        assertEquals("Query: select x from SendEmail x", q.toString());
    }