List of usage examples for org.springframework.util CollectionUtils toIterator
public static <E> Iterator<E> toIterator(@Nullable Enumeration<E> enumeration)
From source file:io.mandrel.MockMvcUtils.java
public static void print(ResultActions result) throws IOException, UnsupportedEncodingException { System.err.println(IOUtils.toString(result.andReturn().getRequest().getInputStream())); CollectionUtils.toIterator(result.andReturn().getRequest().getHeaderNames()) .forEachRemaining(h -> System.err.println(h + ":" + result.andReturn().getRequest().getHeader(h))); System.err.println(result.andReturn().getResponse().getContentAsString()); result.andReturn().getResponse().getHeaderNames() .forEach(h -> System.err.println(h + ":" + result.andReturn().getResponse().getHeader(h))); }