Example usage for org.springframework.mock.http MockHttpOutputMessage getHeaders

List of usage examples for org.springframework.mock.http MockHttpOutputMessage getHeaders

Introduction

In this page you can find the example usage for org.springframework.mock.http MockHttpOutputMessage getHeaders.

Prototype

@Override
public HttpHeaders getHeaders() 

Source Link

Document

Return the headers.

Usage

From source file:org.hobsoft.symmetry.spring.SymmetryHttpMessageConverterTest.java

@Test
public void writeSetsContentType() throws IOException {
    Reflector<Object> reflector = mockReflector(someComponentType(), "x/y");
    MockHttpOutputMessage outputMessage = new MockHttpOutputMessage();

    newConverter(reflector).write(someComponent(), null, outputMessage);

    assertThat(outputMessage.getHeaders(), hasEntry("Content-Type", Collections.singletonList("x/y")));
}