diff --git a/src/main/java/org/springframework/data/mapping/model/AnnotationBasedPersistentProperty.java b/src/main/java/org/springframework/data/mapping/model/AnnotationBasedPersistentProperty.java index 6777ee5cd..bc5fd8ee8 100644 --- a/src/main/java/org/springframework/data/mapping/model/AnnotationBasedPersistentProperty.java +++ b/src/main/java/org/springframework/data/mapping/model/AnnotationBasedPersistentProperty.java @@ -1,5 +1,5 @@ /* - * Copyright 2011-2016 the original author or authors. + * Copyright 2011-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. @@ -42,9 +42,10 @@ import org.springframework.util.Assert; /** * Special {@link PersistentProperty} that takes annotations at a property into account. - * + * * @author Oliver Gierke * @author Christoph Strobl + * @author Mark Paluch */ public abstract class AnnotationBasedPersistentProperty
> extends AbstractPersistentProperty
{ @@ -59,9 +60,8 @@ public abstract class AnnotationBasedPersistentProperty
owner, @@ -79,8 +79,8 @@ public abstract class AnnotationBasedPersistentProperty
> getAccessors() {
- return Arrays. {
+ assertThat(property.findAnnotation(RevisedAnnnotationWithAliasFor.class)).hasValueSatisfying(annotation -> {
+ assertThat(annotation.name()).isEqualTo("my-value");
+ assertThat(annotation.value()).isEqualTo("my-value");
+ });
+ });
+ }
+
@SuppressWarnings("unchecked")
private Map