I have an controller that is written in Java and I would like to test it using Scala with specs2. I can test my controller with JUnit and it works fine. But I am unable to test it with specs2. I have followed the documentation and it mentions I should pass a fakeRequest as an parameter. But methods in the Java controller doesn't accept any parameters so I am unable to use this approach.
How can I test it? Only way I could think of would be using same methods as in JUnit but then using specs2 doesn't bring benefits.
Oh, I have figured it out myself.
I can use helpers from
play.test.Helpers
then I use them with specs2 matchers and it works as intended.