@Test
public void testBeforeTaskReleasedEvent() throws JMSException {     

    logProducer.beforeTaskReleasedEvent(event);
            
    ArgumentCaptor<String> argument = ArgumentCaptor.forClass(String.class);
    verify(session).createTextMessage(argument.capture());
    String messageContent = argument.getValue();
    assertThat(messageContent)
        .isNotNull()
        .doesNotContain("<auditTask>")
        .contains("<org.jbpm.services.task.audit.impl.model.TaskEventImpl>")
        .contains("<type>RELEASED</type>");
    verify(message, times(1)).setStringProperty(eq("LogType"), eq("Task"));        
    verify(producer, times(1)).setPriority(eq(7));
    verify(producer, times(1)).send(eq(message));
}