I have a method that uses setAttribute on the Request object. I need to test that method to see if the attribute set has the right value. I am using EasyMocks and am new to it. I created a mock request object. But I need some help on how to test the method.
Thanks for any help
I have a method that uses setAttribute on the Request object. I need to
Share
Once you created the mock object, you can simply set it up by calling specific methods on it with the expected values. If it needs to return values, you use
EasyMock.expect(...)to configure those. Once you are ready, you callEasyMock.replay(...)to start the testing phase. After the tests you should callEasyMock.verify(...)to check that all preconfigured calls have been made with the expected parameters.See the documentation for more details and examples.