• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

java.lang.VerifyError:Constructor must call super() or this()

 
Ranch Hand
Posts: 157
Netbeans IDE Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

While creating test cases, I encountered with some unknown error as below :



Below is my class and test case:



Here is class I am trying to test



Any idea, how can I pass through the line      
where test case breaks.

Thanks,
 
Bartender
Posts: 242
27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It might be because you're not creating your mocks anywhere. They are declared at the top but you never call the mock method to make them (for example, request = mock(SlingHttpServletRequest.class))
 
Marshal
Posts: 22453
121
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Zachary Griggs wrote:It might be because you're not creating your mocks anywhere. They are declared at the top but you never call the mock method to make them (for example, request = mock(SlingHttpServletRequest.class))


If you use @Mock you don't need to create them yourself, the MockitoJUnitRunner will take care of that.
 
reply
    Bookmark Topic Watch Topic
  • New Topic