java.lang.AssertionError: Expected: a collection with size <0> but: collection size was <1>

Sonatype JIRA | Michael Prescott | 1 year ago
  1. 0

    Testing model attribute in Spring Boot Controllers

    Stack Overflow | 3 months ago | Alexander Not
    java.lang.AssertionError: Model attribute 'restaurants' Expected: a collection with size <2> but: collection size was <0>
  2. 0

    Maven build fails on JDK 1.8

    GitHub | 1 year ago | fernandobrito
    java.lang.AssertionError: Expected: a collection with size <2> but: collection size was <1>
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    mvn install - test failing

    GitHub | 3 years ago | tomaszkubacki
    java.lang.AssertionError: Expected: a collection with size <1> but: collection size was <3>
  5. 0

    JsonPath expression with filters in Spring MVC test

    Stack Overflow | 3 weeks ago | WinterN
    java.lang.AssertionError: JSON path "$._embedded.content[?(@.type=='JOB')].functions" Expected: a collection with size <3> but: collection size was <1>

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.AssertionError

      Expected: a collection with size <0> but: collection size was <1>

      at org.hamcrest.MatcherAssert.assertThat()
    2. Hamcrest
      MatcherAssert$assertThat.callStatic
      1. org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
      2. org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
      3. org.hamcrest.MatcherAssert$assertThat.callStatic(Unknown Source)
      3 frames
    3. Groovy
      AbstractCallSite.callStatic
      1. org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallStatic(CallSiteArray.java:53)
      2. org.codehaus.groovy.runtime.callsite.AbstractCallSite.callStatic(AbstractCallSite.java:157)
      2 frames