Search in sources :

Example 1 with ObjectSerializer

use of org.mule.runtime.api.serialization.ObjectSerializer in project mule by mulesoft.

the class SerializationTestUtils method addJavaSerializerToMockMuleContext.

public static ObjectSerializer addJavaSerializerToMockMuleContext(MuleContext mockMuleContext) {
    ObjectSerializer objectSerializer = getJavaSerializer(mockMuleContext);
    when(mockMuleContext.getObjectSerializer()).thenReturn(objectSerializer);
    return objectSerializer;
}
Also used : JavaObjectSerializer(org.mule.runtime.core.internal.serialization.JavaObjectSerializer) ObjectSerializer(org.mule.runtime.api.serialization.ObjectSerializer)

Example 2 with ObjectSerializer

use of org.mule.runtime.api.serialization.ObjectSerializer in project mule by mulesoft.

the class SerializationTestUtils method getJavaSerializerWithMockContext.

public static ObjectSerializer getJavaSerializerWithMockContext() {
    MuleContext muleContext = mock(MuleContext.class, RETURNS_DEEP_STUBS);
    when(muleContext.getExecutionClassLoader()).thenReturn(ObjectSerializer.class.getClassLoader());
    return getJavaSerializer(muleContext);
}
Also used : MuleContext(org.mule.runtime.core.api.MuleContext) JavaObjectSerializer(org.mule.runtime.core.internal.serialization.JavaObjectSerializer) ObjectSerializer(org.mule.runtime.api.serialization.ObjectSerializer)

Aggregations

ObjectSerializer (org.mule.runtime.api.serialization.ObjectSerializer)2 JavaObjectSerializer (org.mule.runtime.core.internal.serialization.JavaObjectSerializer)2 MuleContext (org.mule.runtime.core.api.MuleContext)1