@FixFor( "MODE-1679" )
@Test
public void shouldBeAbleToCreateAndExecuteJcrSql2QueryWithMultipleReferenceConstraintUsingSubquery()
    throws RepositoryException {

    String sql = "SELECT [notion:multipleReferences] FROM [notion:typed] WHERE [notion:multipleReferences] IN ( SELECT [jcr:uuid] FROM [mix:referenceable] AS node WHERE PATH(node) = '/Other/NodeA[2]')";
    Query query = session.getWorkspace().getQueryManager().createQuery(sql, Query.JCR_SQL2);
    QueryResult result = query.execute();
    validateQuery().rowCount(1).hasColumns("notion:multipleReferences").onEachRow(new Predicate() {
        @Override
        public void validate( int rowNumber,
                              Row row ) throws RepositoryException {
            assertValueIsNonNullReference(row, "notion:multipleReferences");
        }
    }).validate(query, result);
}