modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ReceiveMessageBuilder.java
public T payload(final Object payload, final ObjectMapper objectMapper) {
        try {
            setPayload(objectMapper.writer().writeValueAsString(payload));
        } catch (final JsonProcessingException e) {
            throw new CitrusRuntimeException("Failed to map object graph for message payload", e);
        }

        return self;
    }
/**
     * Expect this message payload as model object which is mapped to a character sequence
     * using the default object to json mapper before validation is performed.
     * @param payload
     * @param objectMapper
     * @return
     */
Expect this message payload as model object which is mapped to a character sequence
using the default object to json mapper before validation is performed.
@param payload
@param objectMapper
@return
Expect this message payload as model object which is mapped to a character sequence using the default object to json mapper before validation is performed . @param payload @param objectMapper @return
public T payload(final Object payload, final ObjectMapper objectMapper) {
        try {
            setPayload(objectMapper.writer().writeValueAsString(payload));
        } catch (final JsonProcessingException e) {
            throw new CitrusRuntimeException("Failed to map object graph for message payload", e);
        }
        return self;
    }
public T payload ( final Object payload , final ObjectMapper objectMapper ) { try { setPayload ( objectMapper . writer ( ) . writeValueAsString ( payload ) ) ; } catch ( final JsonProcessingException e ) { throw new CitrusRuntimeException ( "Failed to map object graph for message payload" , e ) ; } return self ; }
Expect this message payload as model object which is mapped to a character sequence
 using the default object to json mapper before validation is performed.
Expect this message payload as model object which is mapped to a character sequence using the default object to json mapper before validation is performed .