isEmpty() on an ArrayList results in false although its size is 0

Advertisements In a test I inject a mock to another class which seems to work properly. However, when I check the ArrayList if it is empty the result is false although its length/size is 0. How can this happen and how can I solve this problem? @Slf4j @Configuration @RequiredArgsConstructor @Setter(onMethod_ = @SuppressFBWarnings({"EI_EXPOSE_REP2", "EI_EXPOSE_REP"})) @Getter(onMethod_ =… Read More isEmpty() on an ArrayList results in false although its size is 0