[
https://issues.apache.org/jira/browse/LANG-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15694046#comment-15694046
]
ASF GitHub Bot commented on LANG-1290:
--------------------------------------
Github user Abrasha commented on the issue:
https://github.com/apache/commons-lang/pull/217
@PascalSchumacher, no problem!
```
@Test
public void testAnnotationsOfDifferingTypes() {
assertFalse(AnnotationUtils.equals(field1.getAnnotation(TestAnnotation.class),
field4.getAnnotation(NestAnnotation.class)));
assertFalse(AnnotationUtils.equals(field4.getAnnotation(NestAnnotation.class),
field1.getAnnotation(TestAnnotation.class)));
}
```
This test is successful, but checks a different behaviour than expected.
`field4.getAnnotation(NestAnnotation.class)` is expected to return an
annotation of type `NestAnnotation`, but actually it returns `null` because the
Retention of annotation is set to default.
As a result, test did not cover quite important case.
> Increase test coverage of org.apache.commons.lang3.ArrayUtils class
> -------------------------------------------------------------------
>
> Key: LANG-1290
> URL: https://issues.apache.org/jira/browse/LANG-1290
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.*
> Reporter: Andrii Abramov
> Priority: Minor
> Labels: beginner, test
> Attachments: ArrayUtils.html, ArrayUtils.html
>
>
> There are methods that are not completely covered by tests.
> * swap
> * shift
> * toPrimitive
> The coverage of these methods should be closely to 100%.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)