diff --git a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java index 2c236d2ebe..779132aee3 100644 --- a/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java +++ b/spring-core/src/test/java/org/springframework/core/annotation/AnnotatedElementUtilsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -204,6 +204,15 @@ public class AnnotatedElementUtilsTests { attributes.get("value")); } + @Test + @Ignore("To be validated by ") + public void getAllMergedAnnotationsOnClassWithInterface() throws NoSuchMethodException { + Method m = TransactionalServiceImpl.class.getMethod("doIt"); + Set allMergedAnnotations = + getAllMergedAnnotations(m, Transactional.class); + assertEquals(1, allMergedAnnotations.size()); + } + @Test public void getMergedAnnotationAttributesOnClassWithLocalAnnotation() { Class element = TxConfig.class; @@ -1272,4 +1281,17 @@ public class AnnotatedElementUtilsTests { static class ResourceHolder { } + interface TransactionalService { + + @Transactional + void doIt(); + } + + class TransactionalServiceImpl implements TransactionalService { + + @Override + public void doIt() { + } + } + }