use of org.springframework.security.rsocket.api.PayloadExchange in project spring-security by spring-projects.
the class PayloadSocketAcceptorTests method acceptWhenDefaultMetadataMimeTypeOverrideThenDefaulted.
@Test
public void acceptWhenDefaultMetadataMimeTypeOverrideThenDefaulted() {
this.acceptor.setDefaultMetadataMimeType(MediaType.APPLICATION_JSON);
given(this.setupPayload.dataMimeType()).willReturn(MediaType.APPLICATION_JSON_VALUE);
PayloadExchange exchange = captureExchange();
assertThat(exchange.getMetadataMimeType()).isEqualTo(MediaType.APPLICATION_JSON);
assertThat(exchange.getDataMimeType()).isEqualTo(MediaType.APPLICATION_JSON);
}
Aggregations