I’m writing a unit test for a custom subclass of org.springframework.http.converter.xml.AbstractXmlHttpMessageConverter<T>
and I need a stub implementation of org.springframework.http.HttpInputMessage. Looking through the Spring unit tests in the SVN repository, I found the class MockHttpInputMessage, which does exactly what I want.
Now, I wonder what is the proper way to reuse this class?
Or is it generally a bad idea, because the class is not meant to be used outside of the Spring unit tests?
I’m not involved in the Spring project, but from the names I would assume that the class is not intended for reuse. Therefore, I would simply take the class in source form and add it to your project test sources.
Of course all this assumes, this is acceptable with respect to licenses.