Search in sources :

Example 1 with DefaultJsonEnvelopeProvider

use of uk.gov.justice.services.messaging.spi.DefaultJsonEnvelopeProvider in project microservice_framework by CJSCommonPlatform.

the class DefaultInterceptorContextProviderTest method shouldProvideInterceptorContext.

@Test
public void shouldProvideInterceptorContext() {
    final DefaultInterceptorContextProvider provider = new DefaultInterceptorContextProvider();
    final JsonEnvelope jsonEnvelope = new DefaultJsonEnvelopeProvider().envelopeFrom(metadata, payload);
    InterceptorContext interceptorContext = provider.interceptorContextWithInput(jsonEnvelope);
    assertThat(interceptorContext, instanceOf(DefaultInterceptorContext.class));
}
Also used : InterceptorContext(uk.gov.justice.services.core.interceptor.InterceptorContext) DefaultInterceptorContext(uk.gov.justice.services.core.interceptor.DefaultInterceptorContext) JsonEnvelope(uk.gov.justice.services.messaging.JsonEnvelope) DefaultJsonEnvelopeProvider(uk.gov.justice.services.messaging.spi.DefaultJsonEnvelopeProvider) DefaultInterceptorContext(uk.gov.justice.services.core.interceptor.DefaultInterceptorContext) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DefaultInterceptorContext (uk.gov.justice.services.core.interceptor.DefaultInterceptorContext)1 InterceptorContext (uk.gov.justice.services.core.interceptor.InterceptorContext)1 JsonEnvelope (uk.gov.justice.services.messaging.JsonEnvelope)1 DefaultJsonEnvelopeProvider (uk.gov.justice.services.messaging.spi.DefaultJsonEnvelopeProvider)1