private void verifySingleReference(String expression, String deName, AccessType type) {
Result result = parser.parse(ScriptConstants.wrapInTags(expression));
Set<DataElementReference> refs = result.getGlobalDataElementReferences();
assertEquals(1, refs.size());
DataElementReference ref = refs.iterator().next();
assertSame(script, ref.getSource());
assertEquals(EnumSet.of(type), ref.getAccessType());
assertEquals(deName, ref.getDataElement());
}