Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

NullPointerException in Page.getCurrent()

srinivasan gv
6 years ago Sep 18, 2015 8:05am
Johannes Häyry
6 years ago Sep 18, 2015 12:04pm
srinivasan gv
6 years ago Sep 18, 2015 1:31pm
Johannes Häyry
6 years ago Sep 18, 2015 2:00pm

I don't claim to be an expert in using mock frameworks, but to me it seems you are mocking static methods and then expecting them to return the same things as the real implementation. See PowerMockito.mockStatic and your usage of UI.getCurrent() and UI.setCurrent().