[
https://issues.apache.org/jira/browse/SLING-8161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Seifert resolved SLING-8161.
-----------------------------------
Resolution: Fixed
Fix Version/s: Servlet Helpers 1.1.10
i've added a method "getStatusMessage" to get this message
https://github.com/apache/sling-org-apache-sling-servlet-helpers/commit/a6b4523059b868d8fe9496e162c258d911be9101
> MockSlingHttpServletResponse.sendError(int sc, String msg) does not save msg
> String
> -----------------------------------------------------------------------------------
>
> Key: SLING-8161
> URL: https://issues.apache.org/jira/browse/SLING-8161
> Project: Sling
> Issue Type: Improvement
> Components: Servlets, Testing
> Affects Versions: Servlet Helpers 1.1.8, Servlet Helpers 1.1.10
> Reporter: Rob McDougall
> Assignee: Stefan Seifert
> Priority: Minor
> Fix For: Servlet Helpers 1.1.10
>
>
> org.apache.sling.servlethelpers.MockSlingHttpServletResponse.sendError(int
> sc, String msg) saves the sc parameter, but discards the msg parameter. This
> makes it impossible to verify the contents of the message in unit tests that
> use this mock.
> It would be trivial to add a member variable of type String to the class in
> order to store that message and then add a getter to retrieve it. This would
> make it possible to verify the contents of the message in a unit test.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)