AnnotationAttributes attributes = AnnotatedElementUtils.getAnnotationAttributes(testClass,
SqlConfig.class.getName());
// Override global attributes with local attributes.
if (attributes != null) {
for (String key : attributes.keySet()) {
Object value = AnnotationUtils.getValue(localSqlConfig, key);
if (value != null) {
// Is the value explicit (i.e., not a 'default')?
if (!value.equals("") && (value != TransactionMode.DEFAULT) && (value != ErrorMode.DEFAULT)) {
attributes.put(key, value);