use of org.springframework.security.web.savedrequest.SavedRequestAwareWrapper in project spring-security by spring-projects.
the class SavedRequestAwareWrapperTests method correctIntHeaderIsReturned.
@Test
public void correctIntHeaderIsReturned() throws Exception {
MockHttpServletRequest request = new MockHttpServletRequest();
request.addHeader("header", "999");
request.addHeader("header", "1000");
SavedRequestAwareWrapper wrapper = createWrapper(request, new MockHttpServletRequest());
assertThat(wrapper.getIntHeader("header")).isEqualTo(999);
assertThat(wrapper.getIntHeader("nonexistent")).isEqualTo(-1);
}
Aggregations