use of org.mule.runtime.core.api.transformer.DataTypeConversionResolver in project mule by mulesoft.
the class DefaultMuleContextTestCase method cachesDataTypeConversionResolver.
@Test
public void cachesDataTypeConversionResolver() throws Exception {
createMuleContext();
disposeIfNeeded(((MuleContextWithRegistries) context).getRegistry(), LOGGER);
final MuleRegistryHelper muleRegistry = mock(MuleRegistryHelper.class);
((DefaultMuleContext) context).setMuleRegistry(muleRegistry);
DataTypeConversionResolver dataTypeConverterResolver1 = context.getDataTypeConverterResolver();
DataTypeConversionResolver dataTypeConverterResolver2 = context.getDataTypeConverterResolver();
assertThat(dataTypeConverterResolver1, instanceOf(DynamicDataTypeConversionResolver.class));
assertThat(dataTypeConverterResolver2, sameInstance(dataTypeConverterResolver1));
verify(muleRegistry).lookupObject(OBJECT_CONVERTER_RESOLVER);
}
Aggregations